search for: vm_account

Displaying 6 results from an estimated 6 matches for "vm_account".

Did you mean: myaccount
2023 Jan 24
0
[RFC PATCH 01/19] mm: Introduce vm_account
> +/** > + * vm_account_init - Initialise a new struct vm_account. > + * @vm_account: pointer to uninitialised vm_account. > + * @task: task to charge against. > + * @user: user to charge against. Must be non-NULL for VM_ACCOUNT_USER. > + * @flags: flags to use when charging to vm_account. > + * > + * In...
2023 Jan 24
0
[RFC PATCH 02/19] drivers/vhost: Convert to use vm_account
...c32f78..a31dd53 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c ... > @@ -780,6 +780,10 @@ static int vhost_vdpa_map(struct vhost_vdpa *v, struct vhost_iotlb *iotlb, > u32 asid = iotlb_to_asid(iotlb); > int r = 0; > > + if (!vdpa->use_va) > + if (vm_account_pinned(&dev->vm_account, PFN_DOWN(size))) > + return -ENOMEM; > + > r = vhost_iotlb_add_range_ctx(iotlb, iova, iova + size - 1, > pa, perm, opaque); > if (r) I suspect some error handling will have to be reworked then, no? > -- > git-series 0.9.1
2019 Sep 03
2
[RFC] Moving RELRO segment
...urce code are very welcomed :) This is > contrary to my intuition because the second R is private dirty. The > number of > VMAs do not decrease. > In mm/mprotect.c, merging is done in mprotect_fixup(), which calls vma_merge() to do the actual work. In the same function you can also see VM_ACCOUNT flag is set for writable VMA, which is why I had to modify the dynamic linker to make R section temporarily writable for it to be mergeable with RELRO (they need to have the same flags to be merged.) Again, IMO all these somewhat indirect manipulations of VMAs were because I was hoping to give the...
2019 Aug 29
3
[RFC] Moving RELRO segment
...ry usage on vm_area_struct, with about 150 processes running. For this to work, I had to modify the dynamic linker: >> 1. The dynamic linker needs to make the read-only VMA briefly writable in order for it to have the same VM flags with the RELRO VMA so that they can be merged. Specifically VM_ACCOUNT is set when a VMA is made writable. >> 2. The cross-DSO CFI implementation in Android dynamic linker currently assumes __cfi_check is at a lower address than all CFI targets, so CFI check fails when RELRO is moved to below text section. After I added support for CFI targets below __cfi_chec...
2019 Aug 28
3
[RFC] Moving RELRO segment
...slab memory usage on vm_area_struct, with about 150 processes running. For this to work, I had to modify the dynamic linker: 1. The dynamic linker needs to make the read-only VMA briefly writable in order for it to have the same VM flags with the RELRO VMA so that they can be merged. Specifically VM_ACCOUNT is set when a VMA is made writable. 2. The cross-DSO CFI implementation in Android dynamic linker currently assumes __cfi_check is at a lower address than all CFI targets, so CFI check fails when RELRO is moved to below text section. After I added support for CFI targets below __cfi_check, I don&...
2019 Aug 29
2
[RFC] Moving RELRO segment
...ut 150 processes running. For this to work, I had >> to modify the dynamic linker: >> >> 1. The dynamic linker needs to make the read-only VMA briefly >> writable in order for it to have the same VM flags with the RELRO VMA so >> that they can be merged. Specifically VM_ACCOUNT is set when a VMA is made >> writable. >> >> 2. The cross-DSO CFI implementation in Android dynamic linker >> currently assumes __cfi_check is at a lower address than all CFI targets, >> so CFI check fails when RELRO is moved to below text section. After I added >...