tag | line | file | source code |
vma | 164 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma, unsigned long addr) |
vma | 173 | arch/alpha/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_mm, addr); |
vma | 175 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 185 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 195 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 215 | arch/alpha/kernel/ptrace.c | static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 224 | arch/alpha/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_mm, addr); |
vma | 226 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 236 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 246 | arch/alpha/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 251 | arch/alpha/kernel/ptrace.c | do_wp_page(tsk, vma, addr, 1); |
vma | 259 | arch/alpha/kernel/ptrace.c | set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot))); |
vma | 266 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma; |
vma | 269 | arch/alpha/kernel/ptrace.c | vma = find_vma(tsk,addr); |
vma | 270 | arch/alpha/kernel/ptrace.c | if (!vma) |
vma | 272 | arch/alpha/kernel/ptrace.c | if (vma->vm_start <= addr) |
vma | 273 | arch/alpha/kernel/ptrace.c | return vma; |
vma | 274 | arch/alpha/kernel/ptrace.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 276 | arch/alpha/kernel/ptrace.c | if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) |
vma | 278 | arch/alpha/kernel/ptrace.c | vma->vm_offset -= vma->vm_start - addr; |
vma | 279 | arch/alpha/kernel/ptrace.c | vma->vm_start = addr; |
vma | 280 | arch/alpha/kernel/ptrace.c | return vma; |
vma | 290 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 293 | arch/alpha/kernel/ptrace.c | if (!vma) { |
vma | 298 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 301 | arch/alpha/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 302 | arch/alpha/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 303 | arch/alpha/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 308 | arch/alpha/kernel/ptrace.c | low = get_long(tsk, vma, addr); |
vma | 318 | arch/alpha/kernel/ptrace.c | long l = get_long(tsk, vma, addr); |
vma | 333 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 335 | arch/alpha/kernel/ptrace.c | if (!vma) |
vma | 339 | arch/alpha/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 341 | arch/alpha/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 342 | arch/alpha/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 343 | arch/alpha/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 348 | arch/alpha/kernel/ptrace.c | low = get_long(tsk, vma, addr); |
vma | 354 | arch/alpha/kernel/ptrace.c | put_long(tsk, vma, addr, low); |
vma | 357 | arch/alpha/kernel/ptrace.c | put_long(tsk, vma, addr, data); |
vma | 44 | arch/alpha/mm/fault.c | struct vm_area_struct * vma; |
vma | 46 | arch/alpha/mm/fault.c | vma = find_vma(current, address); |
vma | 47 | arch/alpha/mm/fault.c | if (!vma) |
vma | 49 | arch/alpha/mm/fault.c | if (vma->vm_start <= address) |
vma | 51 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 53 | arch/alpha/mm/fault.c | if (expand_stack(vma, address)) |
vma | 61 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_EXEC)) |
vma | 65 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_WRITE))) |
vma | 68 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 72 | arch/alpha/mm/fault.c | handle_mm_fault(vma, address, cause > 0); |
vma | 87 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma, unsigned long addr) |
vma | 95 | arch/i386/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_mm, addr); |
vma | 97 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 107 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 117 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 0); |
vma | 137 | arch/i386/kernel/ptrace.c | static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long addr, |
vma | 146 | arch/i386/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_mm, addr); |
vma | 148 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 158 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 168 | arch/i386/kernel/ptrace.c | do_no_page(tsk, vma, addr, 1); |
vma | 173 | arch/i386/kernel/ptrace.c | do_wp_page(tsk, vma, addr, 1); |
vma | 181 | arch/i386/kernel/ptrace.c | set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot))); |
vma | 187 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma; |
vma | 190 | arch/i386/kernel/ptrace.c | vma = find_vma(tsk,addr); |
vma | 191 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 193 | arch/i386/kernel/ptrace.c | if (vma->vm_start <= addr) |
vma | 194 | arch/i386/kernel/ptrace.c | return vma; |
vma | 195 | arch/i386/kernel/ptrace.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 197 | arch/i386/kernel/ptrace.c | if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) |
vma | 199 | arch/i386/kernel/ptrace.c | vma->vm_offset -= vma->vm_start - addr; |
vma | 200 | arch/i386/kernel/ptrace.c | vma->vm_start = addr; |
vma | 201 | arch/i386/kernel/ptrace.c | return vma; |
vma | 211 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 213 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 217 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 219 | arch/i386/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 220 | arch/i386/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 221 | arch/i386/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 224 | arch/i386/kernel/ptrace.c | low = get_long(tsk, vma, addr & ~(sizeof(long)-1)); |
vma | 242 | arch/i386/kernel/ptrace.c | *result = get_long(tsk, vma, addr); |
vma | 253 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 255 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 259 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 261 | arch/i386/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 262 | arch/i386/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 263 | arch/i386/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 266 | arch/i386/kernel/ptrace.c | low = get_long(tsk, vma, addr & ~(sizeof(long)-1)); |
vma | 291 | arch/i386/kernel/ptrace.c | put_long(tsk, vma, addr & ~(sizeof(long)-1),low); |
vma | 294 | arch/i386/kernel/ptrace.c | put_long(tsk, vma, addr, data); |
vma | 36 | arch/i386/mm/fault.c | struct vm_area_struct * vma; |
vma | 42 | arch/i386/mm/fault.c | vma = find_vma(current, address); |
vma | 43 | arch/i386/mm/fault.c | if (!vma) |
vma | 45 | arch/i386/mm/fault.c | if (vma->vm_start <= address) |
vma | 47 | arch/i386/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 59 | arch/i386/mm/fault.c | if (expand_stack(vma, address)) |
vma | 70 | arch/i386/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 76 | arch/i386/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 92 | arch/i386/mm/fault.c | do_wp_page(current, vma, address, error_code & 2); |
vma | 95 | arch/i386/mm/fault.c | do_no_page(current, vma, address, error_code & 2); |
vma | 86 | arch/mips/kernel/ptrace.c | static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr) |
vma | 93 | arch/mips/kernel/ptrace.c | pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr); |
vma | 95 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 105 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 125 | arch/mips/kernel/ptrace.c | static void put_long(struct vm_area_struct * vma, unsigned long addr, |
vma | 133 | arch/mips/kernel/ptrace.c | pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr); |
vma | 135 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 145 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 150 | arch/mips/kernel/ptrace.c | do_wp_page(vma, addr, 1); |
vma | 158 | arch/mips/kernel/ptrace.c | set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot))); |
vma | 164 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma; |
vma | 167 | arch/mips/kernel/ptrace.c | vma = find_vma(tsk, addr); |
vma | 168 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 170 | arch/mips/kernel/ptrace.c | if (vma->vm_start <= addr) |
vma | 171 | arch/mips/kernel/ptrace.c | return vma; |
vma | 172 | arch/mips/kernel/ptrace.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 174 | arch/mips/kernel/ptrace.c | if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) |
vma | 176 | arch/mips/kernel/ptrace.c | vma->vm_offset -= vma->vm_start - addr; |
vma | 177 | arch/mips/kernel/ptrace.c | vma->vm_start = addr; |
vma | 178 | arch/mips/kernel/ptrace.c | return vma; |
vma | 188 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 190 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 194 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 196 | arch/mips/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 197 | arch/mips/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 198 | arch/mips/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 201 | arch/mips/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 219 | arch/mips/kernel/ptrace.c | *result = get_long(vma, addr); |
vma | 230 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 232 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 236 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 238 | arch/mips/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 239 | arch/mips/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 240 | arch/mips/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 243 | arch/mips/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 268 | arch/mips/kernel/ptrace.c | put_long(vma, addr & ~(sizeof(long)-1),low); |
vma | 271 | arch/mips/kernel/ptrace.c | put_long(vma, addr, data); |
vma | 36 | arch/mips/kernel/sysmips.c | struct vm_area_struct * vma; |
vma | 38 | arch/mips/kernel/sysmips.c | vma = find_vma(current, address); |
vma | 39 | arch/mips/kernel/sysmips.c | if (!vma || vma->vm_start > address || !(vma->vm_flags & VM_READ)) |
vma | 41 | arch/mips/kernel/sysmips.c | address = vma->vm_end - address; |
vma | 44 | arch/mips/kernel/sysmips.c | if (vma->vm_next && vma->vm_next->vm_start == vma->vm_end && |
vma | 45 | arch/mips/kernel/sysmips.c | (vma->vm_next->vm_flags & VM_READ)) |
vma | 31 | arch/mips/mm/fault.c | struct vm_area_struct * vma; |
vma | 38 | arch/mips/mm/fault.c | vma = find_vma(current, address); |
vma | 39 | arch/mips/mm/fault.c | if (!vma) |
vma | 41 | arch/mips/mm/fault.c | if (vma->vm_start <= address) |
vma | 43 | arch/mips/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 45 | arch/mips/mm/fault.c | if (expand_stack(vma, address)) |
vma | 53 | arch/mips/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 56 | arch/mips/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 59 | arch/mips/mm/fault.c | handle_mm_fault(vma, address, writeaccess); |
vma | 185 | arch/ppc/mm/fault.c | struct vm_area_struct * vma; |
vma | 190 | arch/ppc/mm/fault.c | for (vma = current->mm->mmap ; ; vma = vma->vm_next) |
vma | 192 | arch/ppc/mm/fault.c | if (!vma) |
vma | 198 | arch/ppc/mm/fault.c | if (vma->vm_end > address) |
vma | 202 | arch/ppc/mm/fault.c | vma = find_vma(current, address); |
vma | 203 | arch/ppc/mm/fault.c | if (!vma) |
vma | 208 | arch/ppc/mm/fault.c | if (vma->vm_start <= address){ |
vma | 211 | arch/ppc/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 217 | arch/ppc/mm/fault.c | if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 219 | arch/ppc/mm/fault.c | printk("stack2: vma->vm_end-addres %x rlim %x\n", vma->vm_end - address, |
vma | 221 | arch/ppc/mm/fault.c | printk("stack2: vm_end %x address = %x\n", vma->vm_end,address); |
vma | 226 | arch/ppc/mm/fault.c | vma->vm_offset -= vma->vm_start - (address & PAGE_MASK); |
vma | 227 | arch/ppc/mm/fault.c | vma->vm_start = (address & PAGE_MASK); |
vma | 238 | arch/ppc/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 242 | arch/ppc/mm/fault.c | current,address,vma->vm_flags,current->mm,vma,vma->vm_start,vma->vm_end); |
vma | 252 | arch/ppc/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 255 | arch/ppc/mm/fault.c | _printk("vma = %x\n", vma); |
vma | 256 | arch/ppc/mm/fault.c | _printk("vma->vm_flags = %x\n", vma->vm_flags); |
vma | 261 | arch/ppc/mm/fault.c | vma, VM_READ,VM_EXEC); |
vma | 263 | arch/ppc/mm/fault.c | vma->vm_start, vma->vm_end); |
vma | 266 | arch/ppc/mm/fault.c | printk("vma->vm_flags = %x\n", vma->vm_flags); |
vma | 273 | arch/ppc/mm/fault.c | handle_mm_fault(vma, address, error_code & 2); |
vma | 296 | arch/ppc/mm/fault.c | current,address,vma->vm_flags,current->mm,vma,vma->vm_start,vma->vm_end); |
vma | 130 | arch/sparc/mm/fault.c | struct vm_area_struct *vma; |
vma | 157 | arch/sparc/mm/fault.c | vma = find_vma(current, address); |
vma | 158 | arch/sparc/mm/fault.c | if(!vma) |
vma | 160 | arch/sparc/mm/fault.c | if(vma->vm_start <= address) |
vma | 162 | arch/sparc/mm/fault.c | if(!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 164 | arch/sparc/mm/fault.c | if(expand_stack(vma, address)) |
vma | 172 | arch/sparc/mm/fault.c | if(!(vma->vm_flags & VM_WRITE)) |
vma | 176 | arch/sparc/mm/fault.c | if(!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 179 | arch/sparc/mm/fault.c | handle_mm_fault(vma, address, error_code & FAULT_CODE_WRITE); |
vma | 32 | arch/sparc/mm/loadmmu.c | void (*update_mmu_cache)(struct vm_area_struct *vma, unsigned long address, pte_t pte); |
vma | 805 | arch/sparc/mm/srmmu.c | void srmmu_update_mmu_cache(struct vm_area_struct * vma, |
vma | 681 | arch/sparc/mm/sun4c.c | void sun4c_update_mmu_cache(struct vm_area_struct * vma, |
vma | 95 | drivers/char/mem.c | static int mmap_mem(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 97 | drivers/char/mem.c | if (vma->vm_offset & ~PAGE_MASK) |
vma | 106 | drivers/char/mem.c | if (x86 > 3 && vma->vm_offset >= high_memory) |
vma | 107 | drivers/char/mem.c | pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; |
vma | 109 | drivers/char/mem.c | if (remap_page_range(vma->vm_start, vma->vm_offset, vma->vm_end - vma->vm_start, vma->vm_page_prot)) |
vma | 111 | drivers/char/mem.c | vma->vm_inode = inode; |
vma | 179 | drivers/char/mem.c | static int mmap_zero(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 181 | drivers/char/mem.c | if (vma->vm_flags & VM_SHARED) |
vma | 183 | drivers/char/mem.c | if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot)) |
vma | 240 | drivers/sound/soundcard.c | sound_mmap (inode_handle * inode, file_handle * file, vm_area_handle * vma) |
vma | 259 | drivers/sound/soundcard.c | if ((vma_get_flags (vma) & (VM_READ | VM_WRITE)) == (VM_READ | VM_WRITE)) |
vma | 265 | drivers/sound/soundcard.c | if (vma_get_flags (vma) & VM_READ) |
vma | 269 | drivers/sound/soundcard.c | else if (vma_get_flags (vma) & VM_WRITE) |
vma | 297 | drivers/sound/soundcard.c | if (vma_get_offset (vma) != 0) |
vma | 303 | drivers/sound/soundcard.c | size = vma_get_end (vma) - vma_get_start (vma); |
vma | 312 | drivers/sound/soundcard.c | if (remap_page_range (vma_get_start (vma), dmap->raw_buf_phys, |
vma | 313 | drivers/sound/soundcard.c | vma_get_end (vma) - vma_get_start (vma), |
vma | 314 | drivers/sound/soundcard.c | vma_get_page_prot (vma))) |
vma | 317 | drivers/sound/soundcard.c | vma_set_inode (vma, inode); |
vma | 851 | fs/binfmt_elf.c | static inline int maydump(struct vm_area_struct *vma) |
vma | 854 | fs/binfmt_elf.c | if (vma->vm_flags & (VM_WRITE|VM_GROWSUP|VM_GROWSDOWN)) |
vma | 856 | fs/binfmt_elf.c | if (vma->vm_flags & (VM_READ|VM_EXEC|VM_EXECUTABLE|VM_SHARED)) |
vma | 952 | fs/binfmt_elf.c | struct vm_area_struct *vma; |
vma | 973 | fs/binfmt_elf.c | for(vma = current->mm->mmap; vma != NULL; vma = vma->vm_next) { |
vma | 974 | fs/binfmt_elf.c | int sz = vma->vm_end-vma->vm_start; |
vma | 976 | fs/binfmt_elf.c | if (!maydump(vma)) |
vma | 1156 | fs/binfmt_elf.c | for(vma = current->mm->mmap, i = 0; |
vma | 1157 | fs/binfmt_elf.c | i < segs && vma != NULL; vma = vma->vm_next) { |
vma | 1161 | fs/binfmt_elf.c | if (!maydump(vma)) |
vma | 1165 | fs/binfmt_elf.c | sz = vma->vm_end - vma->vm_start; |
vma | 1169 | fs/binfmt_elf.c | phdr.p_vaddr = vma->vm_start; |
vma | 1174 | fs/binfmt_elf.c | phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; |
vma | 1175 | fs/binfmt_elf.c | if (vma->vm_flags & VM_WRITE) phdr.p_flags |= PF_W; |
vma | 1176 | fs/binfmt_elf.c | if (vma->vm_flags & VM_EXEC) phdr.p_flags |= PF_X; |
vma | 1190 | fs/binfmt_elf.c | for(i = 0, vma = current->mm->mmap; |
vma | 1191 | fs/binfmt_elf.c | i < segs && vma != NULL; |
vma | 1192 | fs/binfmt_elf.c | vma = vma->vm_next) { |
vma | 1193 | fs/binfmt_elf.c | unsigned long addr = vma->vm_start; |
vma | 1194 | fs/binfmt_elf.c | unsigned long len = vma->vm_end - vma->vm_start; |
vma | 1196 | fs/binfmt_elf.c | if (!maydump(vma)) |
vma | 94 | fs/msdos/mmap.c | int msdos_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 96 | fs/msdos/mmap.c | if (vma->vm_flags & VM_SHARED) /* only PAGE_COW or read-only supported now */ |
vma | 98 | fs/msdos/mmap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
vma | 107 | fs/msdos/mmap.c | vma->vm_inode = inode; |
vma | 109 | fs/msdos/mmap.c | vma->vm_ops = &msdos_file_mmap; |
vma | 31 | fs/namei.c | struct vm_area_struct * vma; |
vma | 35 | fs/namei.c | vma = find_vma(current, address); |
vma | 36 | fs/namei.c | if (!vma || vma->vm_start > address || !(vma->vm_flags & VM_READ)) |
vma | 38 | fs/namei.c | address = vma->vm_end - address; |
vma | 41 | fs/namei.c | if (vma->vm_next && vma->vm_next->vm_start == vma->vm_end && |
vma | 42 | fs/namei.c | (vma->vm_next->vm_flags & VM_READ)) |
vma | 132 | fs/ncpfs/mmap.c | ncp_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 137 | fs/ncpfs/mmap.c | if (vma->vm_flags & VM_SHARED) |
vma | 146 | fs/ncpfs/mmap.c | vma->vm_inode = inode; |
vma | 148 | fs/ncpfs/mmap.c | vma->vm_ops = &ncp_file_mmap; |
vma | 100 | fs/nfs/mmap.c | int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 102 | fs/nfs/mmap.c | if (vma->vm_flags & VM_SHARED) /* only PAGE_COW or read-only supported now */ |
vma | 111 | fs/nfs/mmap.c | vma->vm_inode = inode; |
vma | 113 | fs/nfs/mmap.c | vma->vm_ops = &nfs_file_mmap; |
vma | 475 | fs/proc/array.c | struct vm_area_struct *vma = tsk->mm->mmap; |
vma | 476 | fs/proc/array.c | while (vma) { |
vma | 477 | fs/proc/array.c | vsize += vma->vm_end - vma->vm_start; |
vma | 478 | fs/proc/array.c | vma = vma->vm_next; |
vma | 634 | fs/proc/array.c | struct vm_area_struct * vma = tsk->mm->mmap; |
vma | 636 | fs/proc/array.c | while (vma) { |
vma | 637 | fs/proc/array.c | pgd_t *pgd = pgd_offset(tsk->mm, vma->vm_start); |
vma | 640 | fs/proc/array.c | statm_pgd_range(pgd, vma->vm_start, vma->vm_end, &pages, &shared, &dirty, &total); |
vma | 645 | fs/proc/array.c | if (vma->vm_flags & VM_EXECUTABLE) |
vma | 647 | fs/proc/array.c | else if (vma->vm_flags & VM_GROWSDOWN) |
vma | 649 | fs/proc/array.c | else if (vma->vm_end > 0x60000000) |
vma | 653 | fs/proc/array.c | vma = vma->vm_next; |
vma | 105 | fs/proc/link.c | struct vm_area_struct * vma; |
vma | 108 | fs/proc/link.c | vma = p->mm->mmap; |
vma | 109 | fs/proc/link.c | while (vma) { |
vma | 110 | fs/proc/link.c | if (vma->vm_flags & VM_EXECUTABLE) { |
vma | 111 | fs/proc/link.c | new_inode = vma->vm_inode; |
vma | 114 | fs/proc/link.c | vma = vma->vm_next; |
vma | 28 | fs/proc/mem.c | struct vm_area_struct *vma; |
vma | 31 | fs/proc/mem.c | vma = find_vma(tsk, addr); |
vma | 32 | fs/proc/mem.c | if (!vma) |
vma | 34 | fs/proc/mem.c | if (vma->vm_start > addr) |
vma | 36 | fs/proc/mem.c | if (!(vma->vm_flags & VM_READ)) |
vma | 38 | fs/proc/mem.c | while ((retval = vma->vm_end - addr) < count) { |
vma | 39 | fs/proc/mem.c | struct vm_area_struct *next = vma->vm_next; |
vma | 42 | fs/proc/mem.c | if (vma->vm_end != next->vm_start) |
vma | 46 | fs/proc/mem.c | vma = next; |
vma | 204 | fs/proc/mem.c | struct vm_area_struct * vma) |
vma | 232 | fs/proc/mem.c | stmp = vma->vm_offset; |
vma | 233 | fs/proc/mem.c | while (stmp < vma->vm_offset + (vma->vm_end - vma->vm_start)) { |
vma | 267 | fs/proc/mem.c | stmp = vma->vm_offset; |
vma | 268 | fs/proc/mem.c | dtmp = vma->vm_start; |
vma | 270 | fs/proc/mem.c | while (dtmp < vma->vm_end) { |
vma | 289 | fs/proc/mem.c | if ((vma->vm_flags & VM_WRITE) && !pte_write(*src_table)) |
vma | 300 | fs/proc/mem.c | invalidate_range(vma->vm_mm, vma->vm_start, vma->vm_end); |
vma | 104 | fs/smbfs/mmap.c | smb_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 109 | fs/smbfs/mmap.c | if (vma->vm_flags & VM_SHARED) |
vma | 118 | fs/smbfs/mmap.c | vma->vm_inode = inode; |
vma | 120 | fs/smbfs/mmap.c | vma->vm_ops = &smb_file_mmap; |
vma | 677 | fs/super.c | struct vm_area_struct * vma; |
vma | 683 | fs/super.c | vma = find_vma(current, (unsigned long) data); |
vma | 684 | fs/super.c | if (!vma || (unsigned long) data < vma->vm_start) |
vma | 686 | fs/super.c | i = vma->vm_end - (unsigned long) data; |
vma | 50 | include/asm-alpha/pgtable.h | static inline void invalidate_page(struct vm_area_struct *vma, |
vma | 53 | include/asm-alpha/pgtable.h | struct mm_struct * mm = vma->vm_mm; |
vma | 58 | include/asm-alpha/pgtable.h | tbi(2 + ((vma->vm_flags & VM_EXEC) != 0), addr); |
vma | 465 | include/asm-alpha/pgtable.h | extern inline void update_mmu_cache(struct vm_area_struct * vma, |
vma | 56 | include/asm-i386/pgtable.h | static inline void invalidate_page(struct vm_area_struct *vma, |
vma | 59 | include/asm-i386/pgtable.h | if (vma->vm_mm == current->mm) |
vma | 92 | include/asm-i386/pgtable.h | static inline void invalidate_page(struct vm_area_struct *vma, |
vma | 430 | include/asm-i386/pgtable.h | extern inline void update_mmu_cache(struct vm_area_struct * vma, |
vma | 551 | include/asm-mips/pgtable.h | extern void update_mmu_cache(struct vm_area_struct * vma, |
vma | 483 | include/asm-ppc/pgtable.h | extern inline void update_mmu_cache(struct vm_area_struct * vma, |
vma | 487 | include/asm-ppc/pgtable.h | printk("Update MMU cache - VMA: %x, Addr: %x, PTE: %x\n", vma, address, *(long *)&_pte); |
vma | 488 | include/asm-ppc/pgtable.h | _printk("Update MMU cache - VMA: %x, Addr: %x, PTE: %x\n", vma, address, *(long *)&_pte); |
vma | 270 | include/asm-sparc/pgtable.h | extern void (*update_mmu_cache)(struct vm_area_struct *vma, unsigned long address, pte_t pte); |
vma | 189 | include/linux/mm.h | extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma); |
vma | 194 | include/linux/mm.h | extern void handle_mm_fault(struct vm_area_struct *vma, unsigned long address, int write_access); |
vma | 195 | include/linux/mm.h | extern void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access); |
vma | 196 | include/linux/mm.h | extern void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access); |
vma | 242 | include/linux/mm.h | static inline int expand_stack(struct vm_area_struct * vma, unsigned long address) |
vma | 247 | include/linux/mm.h | if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 249 | include/linux/mm.h | grow = vma->vm_start - address; |
vma | 250 | include/linux/mm.h | vma->vm_start = address; |
vma | 251 | include/linux/mm.h | vma->vm_offset -= grow; |
vma | 252 | include/linux/mm.h | vma->vm_mm->total_vm += grow >> PAGE_SHIFT; |
vma | 253 | include/linux/mm.h | if (vma->vm_flags & VM_LOCKED) |
vma | 254 | include/linux/mm.h | vma->vm_mm->locked_vm += grow >> PAGE_SHIFT; |
vma | 283 | include/linux/mm.h | struct vm_area_struct * vma; |
vma | 285 | include/linux/mm.h | vma = find_vma(task,start_addr); |
vma | 286 | include/linux/mm.h | if (!vma || end_addr <= vma->vm_start) |
vma | 288 | include/linux/mm.h | return vma; |
vma | 159 | include/linux/ncp_fs.h | int ncp_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
vma | 121 | include/linux/nfs_fs.h | extern int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
vma | 177 | include/linux/smb_fs.h | int smb_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
vma | 441 | mm/filemap.c | static int filemap_write_page(struct vm_area_struct * vma, |
vma | 462 | mm/filemap.c | inode = vma->vm_inode; |
vma | 502 | mm/filemap.c | int filemap_swapout(struct vm_area_struct * vma, |
vma | 512 | mm/filemap.c | invalidate_page(vma, (offset + vma->vm_start - vma->vm_offset)); |
vma | 513 | mm/filemap.c | error = filemap_write_page(vma, offset, page); |
vma | 525 | mm/filemap.c | static pte_t filemap_swapin(struct vm_area_struct * vma, |
vma | 533 | mm/filemap.c | return mk_pte(page,vma->vm_page_prot); |
vma | 537 | mm/filemap.c | static inline int filemap_sync_pte(pte_t * ptep, struct vm_area_struct *vma, |
vma | 550 | mm/filemap.c | invalidate_page(vma, address); |
vma | 557 | mm/filemap.c | invalidate_page(vma, address); |
vma | 568 | mm/filemap.c | error = filemap_write_page(vma, address - vma->vm_start + vma->vm_offset, page); |
vma | 575 | mm/filemap.c | struct vm_area_struct *vma, unsigned long offset, unsigned int flags) |
vma | 596 | mm/filemap.c | error |= filemap_sync_pte(pte, vma, address + offset, flags); |
vma | 605 | mm/filemap.c | struct vm_area_struct *vma, unsigned int flags) |
vma | 626 | mm/filemap.c | error |= filemap_sync_pte_range(pmd, address, end - address, vma, offset, flags); |
vma | 633 | mm/filemap.c | static int filemap_sync(struct vm_area_struct * vma, unsigned long address, |
vma | 642 | mm/filemap.c | error |= filemap_sync_pmd_range(dir, address, end - address, vma, flags); |
vma | 646 | mm/filemap.c | invalidate_range(vma->vm_mm, end - size, end); |
vma | 653 | mm/filemap.c | static void filemap_unmap(struct vm_area_struct *vma, unsigned long start, size_t len) |
vma | 655 | mm/filemap.c | filemap_sync(vma, start, len, MS_ASYNC); |
vma | 696 | mm/filemap.c | int generic_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 700 | mm/filemap.c | if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) { |
vma | 704 | mm/filemap.c | if (vma->vm_offset & (PAGE_SIZE - 1)) |
vma | 708 | mm/filemap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
vma | 719 | mm/filemap.c | vma->vm_inode = inode; |
vma | 721 | mm/filemap.c | vma->vm_ops = ops; |
vma | 730 | mm/filemap.c | static int msync_interval(struct vm_area_struct * vma, |
vma | 733 | mm/filemap.c | if (!vma->vm_inode) |
vma | 735 | mm/filemap.c | if (vma->vm_ops->sync) { |
vma | 737 | mm/filemap.c | error = vma->vm_ops->sync(vma, start, end-start, flags); |
vma | 741 | mm/filemap.c | return file_fsync(vma->vm_inode, NULL); |
vma | 750 | mm/filemap.c | struct vm_area_struct * vma; |
vma | 767 | mm/filemap.c | vma = find_vma(current, start); |
vma | 771 | mm/filemap.c | if (!vma) |
vma | 774 | mm/filemap.c | if (start < vma->vm_start) { |
vma | 776 | mm/filemap.c | start = vma->vm_start; |
vma | 779 | mm/filemap.c | if (end <= vma->vm_end) { |
vma | 781 | mm/filemap.c | error = msync_interval(vma, start, end, flags); |
vma | 788 | mm/filemap.c | error = msync_interval(vma, start, vma->vm_end, flags); |
vma | 791 | mm/filemap.c | start = vma->vm_end; |
vma | 792 | mm/filemap.c | vma = vma->vm_next; |
vma | 287 | mm/memory.c | struct vm_area_struct *vma) |
vma | 290 | mm/memory.c | unsigned long address = vma->vm_start; |
vma | 291 | mm/memory.c | unsigned long end = vma->vm_end; |
vma | 294 | mm/memory.c | cow = (vma->vm_flags & (VM_SHARED | VM_WRITE)) == VM_WRITE; |
vma | 304 | mm/memory.c | invalidate_range(src, vma->vm_start, vma->vm_end); |
vma | 305 | mm/memory.c | invalidate_range(dst, vma->vm_start, vma->vm_end); |
vma | 592 | mm/memory.c | void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 601 | mm/memory.c | page_dir = pgd_offset(vma->vm_mm, address); |
vma | 627 | mm/memory.c | ++vma->vm_mm->rss; |
vma | 629 | mm/memory.c | set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot)))); |
vma | 631 | mm/memory.c | invalidate_page(vma, address); |
vma | 637 | mm/memory.c | invalidate_page(vma, address); |
vma | 641 | mm/memory.c | invalidate_page(vma, address); |
vma | 667 | mm/memory.c | struct vm_area_struct * vma; |
vma | 677 | mm/memory.c | vma = find_vma(current, start); |
vma | 678 | mm/memory.c | if (!vma) |
vma | 680 | mm/memory.c | if (vma->vm_start <= start) |
vma | 682 | mm/memory.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 684 | mm/memory.c | if (expand_stack(vma, start)) |
vma | 692 | mm/memory.c | if (!(vma->vm_flags & VM_READ)) |
vma | 694 | mm/memory.c | if (vma->vm_end - start >= size) |
vma | 696 | mm/memory.c | next = vma->vm_next; |
vma | 697 | mm/memory.c | if (!next || vma->vm_end != next->vm_start) |
vma | 699 | mm/memory.c | vma = next; |
vma | 703 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 708 | mm/memory.c | if (vma->vm_end - start >= size) |
vma | 710 | mm/memory.c | if (!vma->vm_next || vma->vm_end != vma->vm_next->vm_start) |
vma | 712 | mm/memory.c | vma = vma->vm_next; |
vma | 713 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 725 | mm/memory.c | do_wp_page(current, vma, start, 1); |
vma | 730 | mm/memory.c | if (start < vma->vm_end) |
vma | 732 | mm/memory.c | vma = vma->vm_next; |
vma | 733 | mm/memory.c | if (!vma || vma->vm_start != start) |
vma | 735 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 744 | mm/memory.c | static inline void get_empty_page(struct task_struct * tsk, struct vm_area_struct * vma, pte_t * page_table) |
vma | 753 | mm/memory.c | put_page(page_table, pte_mkwrite(mk_pte(tmp, vma->vm_page_prot))); |
vma | 759 | mm/memory.c | static void partial_clear(struct vm_area_struct *vma, unsigned long address) |
vma | 765 | mm/memory.c | page_dir = pgd_offset(vma->vm_mm, address); |
vma | 857 | mm/memory.c | struct vm_area_struct * vma, unsigned long address, |
vma | 862 | mm/memory.c | if (!vma->vm_ops || !vma->vm_ops->swapin) { |
vma | 863 | mm/memory.c | swap_in(tsk, vma, page_table, pte_val(entry), write_access); |
vma | 866 | mm/memory.c | page = vma->vm_ops->swapin(vma, address - vma->vm_start + vma->vm_offset, pte_val(entry)); |
vma | 871 | mm/memory.c | if (mem_map[MAP_NR(pte_page(page))].count > 1 && !(vma->vm_flags & VM_SHARED)) |
vma | 873 | mm/memory.c | ++vma->vm_mm->rss; |
vma | 885 | mm/memory.c | void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 899 | mm/memory.c | do_swap_page(tsk, vma, address, page_table, entry, write_access); |
vma | 903 | mm/memory.c | if (!vma->vm_ops || !vma->vm_ops->nopage) { |
vma | 904 | mm/memory.c | ++vma->vm_mm->rss; |
vma | 906 | mm/memory.c | get_empty_page(tsk, vma, page_table); |
vma | 910 | mm/memory.c | ++vma->vm_mm->rss; |
vma | 916 | mm/memory.c | page = vma->vm_ops->nopage(vma, address, write_access && !(vma->vm_flags & VM_SHARED)); |
vma | 932 | mm/memory.c | entry = mk_pte(page, vma->vm_page_prot); |
vma | 935 | mm/memory.c | } else if (mem_map[MAP_NR(page)].count > 1 && !(vma->vm_flags & VM_SHARED)) |
vma | 953 | mm/memory.c | static inline void handle_pte_fault(struct vm_area_struct * vma, unsigned long address, |
vma | 957 | mm/memory.c | do_no_page(current, vma, address, write_access); |
vma | 967 | mm/memory.c | do_wp_page(current, vma, address, write_access); |
vma | 970 | mm/memory.c | void handle_mm_fault(struct vm_area_struct * vma, unsigned long address, |
vma | 977 | mm/memory.c | pgd = pgd_offset(vma->vm_mm, address); |
vma | 984 | mm/memory.c | handle_pte_fault(vma, address, write_access, pte); |
vma | 985 | mm/memory.c | update_mmu_cache(vma, address, *pte); |
vma | 20 | mm/mlock.c | static inline int mlock_fixup_all(struct vm_area_struct * vma, int newflags) |
vma | 22 | mm/mlock.c | vma->vm_flags = newflags; |
vma | 26 | mm/mlock.c | static inline int mlock_fixup_start(struct vm_area_struct * vma, |
vma | 34 | mm/mlock.c | *n = *vma; |
vma | 35 | mm/mlock.c | vma->vm_start = end; |
vma | 37 | mm/mlock.c | vma->vm_offset += vma->vm_start - n->vm_start; |
vma | 47 | mm/mlock.c | static inline int mlock_fixup_end(struct vm_area_struct * vma, |
vma | 55 | mm/mlock.c | *n = *vma; |
vma | 56 | mm/mlock.c | vma->vm_end = start; |
vma | 58 | mm/mlock.c | n->vm_offset += n->vm_start - vma->vm_start; |
vma | 68 | mm/mlock.c | static inline int mlock_fixup_middle(struct vm_area_struct * vma, |
vma | 81 | mm/mlock.c | *left = *vma; |
vma | 82 | mm/mlock.c | *right = *vma; |
vma | 84 | mm/mlock.c | vma->vm_start = start; |
vma | 85 | mm/mlock.c | vma->vm_end = end; |
vma | 87 | mm/mlock.c | vma->vm_offset += vma->vm_start - left->vm_start; |
vma | 89 | mm/mlock.c | vma->vm_flags = newflags; |
vma | 90 | mm/mlock.c | if (vma->vm_inode) |
vma | 91 | mm/mlock.c | vma->vm_inode->i_count += 2; |
vma | 92 | mm/mlock.c | if (vma->vm_ops && vma->vm_ops->open) { |
vma | 93 | mm/mlock.c | vma->vm_ops->open(left); |
vma | 94 | mm/mlock.c | vma->vm_ops->open(right); |
vma | 101 | mm/mlock.c | static int mlock_fixup(struct vm_area_struct * vma, |
vma | 106 | mm/mlock.c | if (newflags == vma->vm_flags) |
vma | 113 | mm/mlock.c | vma->vm_mm->locked_vm += pages; |
vma | 115 | mm/mlock.c | if (start == vma->vm_start) { |
vma | 116 | mm/mlock.c | if (end == vma->vm_end) |
vma | 117 | mm/mlock.c | retval = mlock_fixup_all(vma, newflags); |
vma | 119 | mm/mlock.c | retval = mlock_fixup_start(vma, end, newflags); |
vma | 121 | mm/mlock.c | if (end == vma->vm_end) |
vma | 122 | mm/mlock.c | retval = mlock_fixup_end(vma, start, newflags); |
vma | 124 | mm/mlock.c | retval = mlock_fixup_middle(vma, start, end, newflags); |
vma | 139 | mm/mlock.c | struct vm_area_struct * vma, * next; |
vma | 150 | mm/mlock.c | vma = find_vma(current, start); |
vma | 151 | mm/mlock.c | if (!vma || vma->vm_start > start) |
vma | 159 | mm/mlock.c | newflags = vma->vm_flags | VM_LOCKED; |
vma | 163 | mm/mlock.c | if (vma->vm_end >= end) { |
vma | 164 | mm/mlock.c | error = mlock_fixup(vma, nstart, end, newflags); |
vma | 168 | mm/mlock.c | tmp = vma->vm_end; |
vma | 169 | mm/mlock.c | next = vma->vm_next; |
vma | 170 | mm/mlock.c | error = mlock_fixup(vma, nstart, tmp, newflags); |
vma | 174 | mm/mlock.c | vma = next; |
vma | 175 | mm/mlock.c | if (!vma || vma->vm_start != nstart) { |
vma | 221 | mm/mlock.c | struct vm_area_struct * vma; |
vma | 232 | mm/mlock.c | for (vma = current->mm->mmap; vma ; vma = vma->vm_next) { |
vma | 235 | mm/mlock.c | newflags = vma->vm_flags | VM_LOCKED; |
vma | 238 | mm/mlock.c | error = mlock_fixup(vma, vma->vm_start, vma->vm_end, newflags); |
vma | 24 | mm/mmap.c | static inline int anon_map(struct inode *ino, struct file * file, struct vm_area_struct * vma) |
vma | 26 | mm/mmap.c | if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot)) |
vma | 57 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 128 | mm/mmap.c | vma = (struct vm_area_struct *)kmalloc(sizeof(struct vm_area_struct), |
vma | 130 | mm/mmap.c | if (!vma) |
vma | 133 | mm/mmap.c | vma->vm_mm = current->mm; |
vma | 134 | mm/mmap.c | vma->vm_start = addr; |
vma | 135 | mm/mmap.c | vma->vm_end = addr + len; |
vma | 136 | mm/mmap.c | vma->vm_flags = prot & (VM_READ | VM_WRITE | VM_EXEC); |
vma | 137 | mm/mmap.c | vma->vm_flags |= flags & (VM_GROWSDOWN | VM_DENYWRITE | VM_EXECUTABLE); |
vma | 138 | mm/mmap.c | vma->vm_flags |= current->mm->def_flags; |
vma | 142 | mm/mmap.c | vma->vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
vma | 144 | mm/mmap.c | vma->vm_flags |= VM_SHARED | VM_MAYSHARE; |
vma | 156 | mm/mmap.c | vma->vm_flags &= ~(VM_MAYWRITE | VM_SHARED); |
vma | 159 | mm/mmap.c | vma->vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
vma | 160 | mm/mmap.c | vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f]; |
vma | 161 | mm/mmap.c | vma->vm_ops = NULL; |
vma | 162 | mm/mmap.c | vma->vm_offset = off; |
vma | 163 | mm/mmap.c | vma->vm_inode = NULL; |
vma | 164 | mm/mmap.c | vma->vm_pte = 0; |
vma | 169 | mm/mmap.c | error = file->f_op->mmap(file->f_inode, file, vma); |
vma | 171 | mm/mmap.c | error = anon_map(NULL, NULL, vma); |
vma | 174 | mm/mmap.c | kfree(vma); |
vma | 177 | mm/mmap.c | insert_vm_struct(current, vma); |
vma | 178 | mm/mmap.c | merge_segments(current, vma->vm_start, vma->vm_end); |
vma | 180 | mm/mmap.c | if (vma->vm_flags & VM_LOCKED) { |
vma | 181 | mm/mmap.c | unsigned long start = vma->vm_start; |
vma | 182 | mm/mmap.c | unsigned long end = vma->vm_end; |
vma | 490 | mm/mmap.c | static void printk_list (struct vm_area_struct * vma) |
vma | 493 | mm/mmap.c | while (vma) { |
vma | 494 | mm/mmap.c | printk("%08lX-%08lX", vma->vm_start, vma->vm_end); |
vma | 495 | mm/mmap.c | vma = vma->vm_next; |
vma | 496 | mm/mmap.c | if (!vma) |
vma | 758 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 761 | mm/mmap.c | for (vma = mm->mmap; vma; vma = vma->vm_next) |
vma | 762 | mm/mmap.c | avl_insert(vma, &mm->mmap_avl); |
vma | 87 | mm/mprotect.c | static inline int mprotect_fixup_all(struct vm_area_struct * vma, |
vma | 90 | mm/mprotect.c | vma->vm_flags = newflags; |
vma | 91 | mm/mprotect.c | vma->vm_page_prot = prot; |
vma | 95 | mm/mprotect.c | static inline int mprotect_fixup_start(struct vm_area_struct * vma, |
vma | 104 | mm/mprotect.c | *n = *vma; |
vma | 105 | mm/mprotect.c | vma->vm_start = end; |
vma | 107 | mm/mprotect.c | vma->vm_offset += vma->vm_start - n->vm_start; |
vma | 118 | mm/mprotect.c | static inline int mprotect_fixup_end(struct vm_area_struct * vma, |
vma | 127 | mm/mprotect.c | *n = *vma; |
vma | 128 | mm/mprotect.c | vma->vm_end = start; |
vma | 130 | mm/mprotect.c | n->vm_offset += n->vm_start - vma->vm_start; |
vma | 141 | mm/mprotect.c | static inline int mprotect_fixup_middle(struct vm_area_struct * vma, |
vma | 155 | mm/mprotect.c | *left = *vma; |
vma | 156 | mm/mprotect.c | *right = *vma; |
vma | 158 | mm/mprotect.c | vma->vm_start = start; |
vma | 159 | mm/mprotect.c | vma->vm_end = end; |
vma | 161 | mm/mprotect.c | vma->vm_offset += vma->vm_start - left->vm_start; |
vma | 163 | mm/mprotect.c | vma->vm_flags = newflags; |
vma | 164 | mm/mprotect.c | vma->vm_page_prot = prot; |
vma | 165 | mm/mprotect.c | if (vma->vm_inode) |
vma | 166 | mm/mprotect.c | vma->vm_inode->i_count += 2; |
vma | 167 | mm/mprotect.c | if (vma->vm_ops && vma->vm_ops->open) { |
vma | 168 | mm/mprotect.c | vma->vm_ops->open(left); |
vma | 169 | mm/mprotect.c | vma->vm_ops->open(right); |
vma | 176 | mm/mprotect.c | static int mprotect_fixup(struct vm_area_struct * vma, |
vma | 182 | mm/mprotect.c | if (newflags == vma->vm_flags) |
vma | 185 | mm/mprotect.c | if (start == vma->vm_start) |
vma | 186 | mm/mprotect.c | if (end == vma->vm_end) |
vma | 187 | mm/mprotect.c | error = mprotect_fixup_all(vma, newflags, newprot); |
vma | 189 | mm/mprotect.c | error = mprotect_fixup_start(vma, end, newflags, newprot); |
vma | 190 | mm/mprotect.c | else if (end == vma->vm_end) |
vma | 191 | mm/mprotect.c | error = mprotect_fixup_end(vma, start, newflags, newprot); |
vma | 193 | mm/mprotect.c | error = mprotect_fixup_middle(vma, start, end, newflags, newprot); |
vma | 205 | mm/mprotect.c | struct vm_area_struct * vma, * next; |
vma | 218 | mm/mprotect.c | vma = find_vma(current, start); |
vma | 219 | mm/mprotect.c | if (!vma || vma->vm_start > start) |
vma | 227 | mm/mprotect.c | newflags = prot | (vma->vm_flags & ~(PROT_READ | PROT_WRITE | PROT_EXEC)); |
vma | 233 | mm/mprotect.c | if (vma->vm_end >= end) { |
vma | 234 | mm/mprotect.c | error = mprotect_fixup(vma, nstart, end, newflags); |
vma | 238 | mm/mprotect.c | tmp = vma->vm_end; |
vma | 239 | mm/mprotect.c | next = vma->vm_next; |
vma | 240 | mm/mprotect.c | error = mprotect_fixup(vma, nstart, tmp, newflags); |
vma | 244 | mm/mprotect.c | vma = next; |
vma | 245 | mm/mprotect.c | if (!vma || vma->vm_start != nstart) { |
vma | 274 | mm/page_alloc.c | void swap_in(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 294 | mm/page_alloc.c | vma->vm_mm->rss++; |
vma | 297 | mm/page_alloc.c | set_pte(page_table, mk_pte(page, vma->vm_page_prot)); |
vma | 300 | mm/page_alloc.c | set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)))); |
vma | 127 | mm/swapfile.c | static inline int unuse_pte(struct vm_area_struct * vma, unsigned long address, |
vma | 153 | mm/swapfile.c | set_pte(dir, pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)))); |
vma | 154 | mm/swapfile.c | ++vma->vm_mm->rss; |
vma | 159 | mm/swapfile.c | static inline int unuse_pmd(struct vm_area_struct * vma, pmd_t *dir, |
vma | 180 | mm/swapfile.c | if (unuse_pte(vma, offset+address-vma->vm_start, pte, type, page)) |
vma | 188 | mm/swapfile.c | static inline int unuse_pgd(struct vm_area_struct * vma, pgd_t *dir, |
vma | 209 | mm/swapfile.c | if (unuse_pmd(vma, pmd, address, end - address, offset, type, page)) |
vma | 217 | mm/swapfile.c | static int unuse_vma(struct vm_area_struct * vma, pgd_t *pgdir, |
vma | 222 | mm/swapfile.c | if (unuse_pgd(vma, pgdir, start, end - start, type, page)) |
vma | 232 | mm/swapfile.c | struct vm_area_struct* vma; |
vma | 239 | mm/swapfile.c | vma = p->mm->mmap; |
vma | 240 | mm/swapfile.c | while (vma) { |
vma | 241 | mm/swapfile.c | pgd_t * pgd = pgd_offset(p->mm, vma->vm_start); |
vma | 242 | mm/swapfile.c | if (unuse_vma(vma, pgd, vma->vm_start, vma->vm_end, type, page)) |
vma | 244 | mm/swapfile.c | vma = vma->vm_next; |
vma | 70 | mm/vmscan.c | static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struct* vma, |
vma | 103 | mm/vmscan.c | if (vma->vm_ops && vma->vm_ops->swapout) { |
vma | 105 | mm/vmscan.c | vma->vm_mm->rss--; |
vma | 106 | mm/vmscan.c | if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table)) |
vma | 113 | mm/vmscan.c | vma->vm_mm->rss--; |
vma | 115 | mm/vmscan.c | invalidate_page(vma, address); |
vma | 128 | mm/vmscan.c | vma->vm_mm->rss--; |
vma | 130 | mm/vmscan.c | invalidate_page(vma, address); |
vma | 134 | mm/vmscan.c | vma->vm_mm->rss--; |
vma | 136 | mm/vmscan.c | invalidate_page(vma, address); |
vma | 156 | mm/vmscan.c | static inline int swap_out_pmd(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 179 | mm/vmscan.c | result = try_to_swap_out(tsk, vma, address, pte, limit); |
vma | 188 | mm/vmscan.c | static inline int swap_out_pgd(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 209 | mm/vmscan.c | int result = swap_out_pmd(tsk, vma, pmd, address, end, limit); |
vma | 218 | mm/vmscan.c | static int swap_out_vma(struct task_struct * tsk, struct vm_area_struct * vma, |
vma | 225 | mm/vmscan.c | if (vma->vm_flags & (VM_SHM | VM_LOCKED)) |
vma | 228 | mm/vmscan.c | end = vma->vm_end; |
vma | 230 | mm/vmscan.c | int result = swap_out_pgd(tsk, vma, pgdir, start, end, limit); |
vma | 242 | mm/vmscan.c | struct vm_area_struct* vma; |
vma | 253 | mm/vmscan.c | vma = find_vma(p, address); |
vma | 254 | mm/vmscan.c | if (!vma) |
vma | 256 | mm/vmscan.c | if (address < vma->vm_start) |
vma | 257 | mm/vmscan.c | address = vma->vm_start; |
vma | 260 | mm/vmscan.c | int result = swap_out_vma(p, vma, pgd_offset(p->mm, address), address, limit); |
vma | 263 | mm/vmscan.c | vma = vma->vm_next; |
vma | 264 | mm/vmscan.c | if (!vma) |
vma | 266 | mm/vmscan.c | address = vma->vm_start; |