vma.h (d744f4acb81ae2f2c33bce71da1f65be32ed1d65) | vma.h (9c3ebeda8fb5a8e9e82ab9364ec3d4b80cd0ec3d) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * vma.h 4 * 5 * Core VMA manipulation API implemented in vma.c. 6 */ 7#ifndef __MM_VMA_H 8#define __MM_VMA_H --- 24 unchanged lines hidden (view full) --- 33 struct vma_iterator *vmi; 34 struct mm_struct *mm; 35 struct vm_area_struct *vma; /* The first vma to munmap */ 36 struct vm_area_struct *prev; /* vma before the munmap area */ 37 struct vm_area_struct *next; /* vma after the munmap area */ 38 struct list_head *uf; /* Userfaultfd list_head */ 39 unsigned long start; /* Aligned start addr (inclusive) */ 40 unsigned long end; /* Aligned end addr (exclusive) */ | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * vma.h 4 * 5 * Core VMA manipulation API implemented in vma.c. 6 */ 7#ifndef __MM_VMA_H 8#define __MM_VMA_H --- 24 unchanged lines hidden (view full) --- 33 struct vma_iterator *vmi; 34 struct mm_struct *mm; 35 struct vm_area_struct *vma; /* The first vma to munmap */ 36 struct vm_area_struct *prev; /* vma before the munmap area */ 37 struct vm_area_struct *next; /* vma after the munmap area */ 38 struct list_head *uf; /* Userfaultfd list_head */ 39 unsigned long start; /* Aligned start addr (inclusive) */ 40 unsigned long end; /* Aligned end addr (exclusive) */ |
41 unsigned long unmap_start; /* Unmap PTE start */ 42 unsigned long unmap_end; /* Unmap PTE end */ |
|
41 int vma_count; /* Number of vmas that will be removed */ 42 unsigned long nr_pages; /* Number of pages being removed */ 43 unsigned long locked_vm; /* Number of locked pages */ 44 unsigned long nr_accounted; /* Number of VM_ACCOUNT pages */ 45 unsigned long exec_vm; 46 unsigned long stack_vm; 47 unsigned long data_vm; 48 bool unlock; /* Unlock after the munmap */ --- 24 unchanged lines hidden (view full) --- 73 74int vma_expand(struct vma_iterator *vmi, struct vm_area_struct *vma, 75 unsigned long start, unsigned long end, pgoff_t pgoff, 76 struct vm_area_struct *next); 77 78int vma_shrink(struct vma_iterator *vmi, struct vm_area_struct *vma, 79 unsigned long start, unsigned long end, pgoff_t pgoff); 80 | 43 int vma_count; /* Number of vmas that will be removed */ 44 unsigned long nr_pages; /* Number of pages being removed */ 45 unsigned long locked_vm; /* Number of locked pages */ 46 unsigned long nr_accounted; /* Number of VM_ACCOUNT pages */ 47 unsigned long exec_vm; 48 unsigned long stack_vm; 49 unsigned long data_vm; 50 bool unlock; /* Unlock after the munmap */ --- 24 unchanged lines hidden (view full) --- 75 76int vma_expand(struct vma_iterator *vmi, struct vm_area_struct *vma, 77 unsigned long start, unsigned long end, pgoff_t pgoff, 78 struct vm_area_struct *next); 79 80int vma_shrink(struct vma_iterator *vmi, struct vm_area_struct *vma, 81 unsigned long start, unsigned long end, pgoff_t pgoff); 82 |
83#ifdef CONFIG_MMU |
|
81/* 82 * init_vma_munmap() - Initializer wrapper for vma_munmap_struct 83 * @vms: The vma munmap struct 84 * @vmi: The vma iterator 85 * @vma: The first vm_area_struct to munmap 86 * @start: The aligned start address to munmap 87 * @end: The aligned end address to munmap 88 * @uf: The userfaultfd list_head --- 14 unchanged lines hidden (view full) --- 103 vms->mm = NULL; 104 vms->start = vms->end = 0; 105 } 106 vms->unlock = unlock; 107 vms->uf = uf; 108 vms->vma_count = 0; 109 vms->nr_pages = vms->locked_vm = vms->nr_accounted = 0; 110 vms->exec_vm = vms->stack_vm = vms->data_vm = 0; | 84/* 85 * init_vma_munmap() - Initializer wrapper for vma_munmap_struct 86 * @vms: The vma munmap struct 87 * @vmi: The vma iterator 88 * @vma: The first vm_area_struct to munmap 89 * @start: The aligned start address to munmap 90 * @end: The aligned end address to munmap 91 * @uf: The userfaultfd list_head --- 14 unchanged lines hidden (view full) --- 106 vms->mm = NULL; 107 vms->start = vms->end = 0; 108 } 109 vms->unlock = unlock; 110 vms->uf = uf; 111 vms->vma_count = 0; 112 vms->nr_pages = vms->locked_vm = vms->nr_accounted = 0; 113 vms->exec_vm = vms->stack_vm = vms->data_vm = 0; |
114 vms->unmap_start = FIRST_USER_ADDRESS; 115 vms->unmap_end = USER_PGTABLES_CEILING; |
|
111} | 116} |
117#endif |
|
112 113int vms_gather_munmap_vmas(struct vma_munmap_struct *vms, 114 struct ma_state *mas_detach); 115 116void vms_complete_munmap_vmas(struct vma_munmap_struct *vms, 117 struct ma_state *mas_detach); 118 119/* --- 356 unchanged lines hidden --- | 118 119int vms_gather_munmap_vmas(struct vma_munmap_struct *vms, 120 struct ma_state *mas_detach); 121 122void vms_complete_munmap_vmas(struct vma_munmap_struct *vms, 123 struct ma_state *mas_detach); 124 125/* --- 356 unchanged lines hidden --- |