tag | line | file | source code |
vma | 45 | arch/alpha/mm/fault.c | struct vm_area_struct * vma; |
vma | 47 | arch/alpha/mm/fault.c | vma = find_vma(current, address); |
vma | 48 | arch/alpha/mm/fault.c | if (!vma) |
vma | 50 | arch/alpha/mm/fault.c | if (vma->vm_start <= address) |
vma | 52 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 54 | arch/alpha/mm/fault.c | if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 56 | arch/alpha/mm/fault.c | vma->vm_offset -= vma->vm_start - (address & PAGE_MASK); |
vma | 57 | arch/alpha/mm/fault.c | vma->vm_start = (address & PAGE_MASK); |
vma | 64 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_EXEC)) |
vma | 67 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_READ)) |
vma | 70 | arch/alpha/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 74 | arch/alpha/mm/fault.c | handle_mm_fault(vma, address, cause > 0); |
vma | 87 | arch/i386/kernel/ptrace.c | static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr) |
vma | 95 | arch/i386/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_task, addr); |
vma | 97 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 107 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 117 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 137 | arch/i386/kernel/ptrace.c | static void put_long(struct vm_area_struct * vma, unsigned long addr, |
vma | 146 | arch/i386/kernel/ptrace.c | pgdir = pgd_offset(vma->vm_task, addr); |
vma | 148 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 158 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 168 | arch/i386/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 173 | arch/i386/kernel/ptrace.c | do_wp_page(vma, addr, 1); |
vma | 183 | arch/i386/kernel/ptrace.c | *pgtable = pte_mkdirty(mk_pte(page, vma->vm_page_prot)); |
vma | 189 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma; |
vma | 192 | arch/i386/kernel/ptrace.c | vma = find_vma(tsk,addr); |
vma | 193 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 195 | arch/i386/kernel/ptrace.c | if (vma->vm_start <= addr) |
vma | 196 | arch/i386/kernel/ptrace.c | return vma; |
vma | 197 | arch/i386/kernel/ptrace.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 199 | arch/i386/kernel/ptrace.c | if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) |
vma | 201 | arch/i386/kernel/ptrace.c | vma->vm_offset -= vma->vm_start - addr; |
vma | 202 | arch/i386/kernel/ptrace.c | vma->vm_start = addr; |
vma | 203 | arch/i386/kernel/ptrace.c | return vma; |
vma | 213 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 215 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 219 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 221 | arch/i386/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 222 | arch/i386/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 223 | arch/i386/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 226 | arch/i386/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 244 | arch/i386/kernel/ptrace.c | *result = get_long(vma, addr); |
vma | 255 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 257 | arch/i386/kernel/ptrace.c | if (!vma) |
vma | 261 | arch/i386/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 263 | arch/i386/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 264 | arch/i386/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 265 | arch/i386/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 268 | arch/i386/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 293 | arch/i386/kernel/ptrace.c | put_long(vma, addr & ~(sizeof(long)-1),low); |
vma | 296 | arch/i386/kernel/ptrace.c | put_long(vma, addr, data); |
vma | 37 | arch/i386/mm/fault.c | struct vm_area_struct * vma; |
vma | 43 | arch/i386/mm/fault.c | vma = find_vma(current, address); |
vma | 44 | arch/i386/mm/fault.c | if (!vma) |
vma | 46 | arch/i386/mm/fault.c | if (vma->vm_start <= address) |
vma | 48 | arch/i386/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 50 | arch/i386/mm/fault.c | if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 52 | arch/i386/mm/fault.c | vma->vm_offset -= vma->vm_start - (address & PAGE_MASK); |
vma | 53 | arch/i386/mm/fault.c | vma->vm_start = (address & PAGE_MASK); |
vma | 63 | arch/i386/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 69 | arch/i386/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 85 | arch/i386/mm/fault.c | do_wp_page(vma, address, error_code & 2); |
vma | 88 | arch/i386/mm/fault.c | do_no_page(vma, address, error_code & 2); |
vma | 85 | arch/mips/kernel/ptrace.c | static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr) |
vma | 92 | arch/mips/kernel/ptrace.c | pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr); |
vma | 94 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 104 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 0); |
vma | 124 | arch/mips/kernel/ptrace.c | static void put_long(struct vm_area_struct * vma, unsigned long addr, |
vma | 132 | arch/mips/kernel/ptrace.c | pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr); |
vma | 134 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 144 | arch/mips/kernel/ptrace.c | do_no_page(vma, addr, 1); |
vma | 149 | arch/mips/kernel/ptrace.c | do_wp_page(vma, addr, 1); |
vma | 159 | arch/mips/kernel/ptrace.c | *pgtable = pte_mkdirty(mk_pte(page, vma->vm_page_prot)); |
vma | 165 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma; |
vma | 168 | arch/mips/kernel/ptrace.c | vma = find_vma(tsk, addr); |
vma | 169 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 171 | arch/mips/kernel/ptrace.c | if (vma->vm_start <= addr) |
vma | 172 | arch/mips/kernel/ptrace.c | return vma; |
vma | 173 | arch/mips/kernel/ptrace.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 175 | arch/mips/kernel/ptrace.c | if (vma->vm_end - addr > tsk->rlim[RLIMIT_STACK].rlim_cur) |
vma | 177 | arch/mips/kernel/ptrace.c | vma->vm_offset -= vma->vm_start - addr; |
vma | 178 | arch/mips/kernel/ptrace.c | vma->vm_start = addr; |
vma | 179 | arch/mips/kernel/ptrace.c | return vma; |
vma | 189 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 191 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 195 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 197 | arch/mips/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 198 | arch/mips/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 199 | arch/mips/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 202 | arch/mips/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 220 | arch/mips/kernel/ptrace.c | *result = get_long(vma, addr); |
vma | 231 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma = find_extend_vma(tsk, addr); |
vma | 233 | arch/mips/kernel/ptrace.c | if (!vma) |
vma | 237 | arch/mips/kernel/ptrace.c | struct vm_area_struct * vma_high = vma; |
vma | 239 | arch/mips/kernel/ptrace.c | if (addr + sizeof(long) >= vma->vm_end) { |
vma | 240 | arch/mips/kernel/ptrace.c | vma_high = vma->vm_next; |
vma | 241 | arch/mips/kernel/ptrace.c | if (!vma_high || vma_high->vm_start != vma->vm_end) |
vma | 244 | arch/mips/kernel/ptrace.c | low = get_long(vma, addr & ~(sizeof(long)-1)); |
vma | 269 | arch/mips/kernel/ptrace.c | put_long(vma, addr & ~(sizeof(long)-1),low); |
vma | 272 | arch/mips/kernel/ptrace.c | put_long(vma, addr, data); |
vma | 39 | arch/mips/mm/fault.c | struct vm_area_struct * vma; |
vma | 47 | arch/mips/mm/fault.c | for (vma = current->mm->mmap ; ; vma = vma->vm_next) { |
vma | 48 | arch/mips/mm/fault.c | if (!vma) |
vma | 50 | arch/mips/mm/fault.c | if (vma->vm_end > address) |
vma | 53 | arch/mips/mm/fault.c | if (vma->vm_start <= address) |
vma | 55 | arch/mips/mm/fault.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 57 | arch/mips/mm/fault.c | if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 59 | arch/mips/mm/fault.c | vma->vm_offset -= vma->vm_start - (address & PAGE_MASK); |
vma | 60 | arch/mips/mm/fault.c | vma->vm_start = (address & PAGE_MASK); |
vma | 70 | arch/mips/mm/fault.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 76 | arch/mips/mm/fault.c | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) |
vma | 80 | arch/mips/mm/fault.c | do_wp_page(vma, address, error_code & 2); |
vma | 83 | arch/mips/mm/fault.c | do_no_page(vma, address, error_code & 2); |
vma | 88 | drivers/char/mem.c | static int mmap_mem(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 90 | drivers/char/mem.c | if (vma->vm_offset & ~PAGE_MASK) |
vma | 99 | drivers/char/mem.c | if (x86 > 3 && vma->vm_offset >= high_memory) |
vma | 100 | drivers/char/mem.c | pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; |
vma | 102 | 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 | 104 | drivers/char/mem.c | vma->vm_inode = inode; |
vma | 172 | drivers/char/mem.c | static int mmap_zero(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 174 | drivers/char/mem.c | if (vma->vm_flags & VM_SHARED) |
vma | 176 | drivers/char/mem.c | if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot)) |
vma | 93 | fs/msdos/mmap.c | int msdos_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 95 | fs/msdos/mmap.c | if (vma->vm_flags & VM_SHARED) /* only PAGE_COW or read-only supported now */ |
vma | 97 | fs/msdos/mmap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
vma | 106 | fs/msdos/mmap.c | vma->vm_inode = inode; |
vma | 108 | 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 | 97 | fs/nfs/mmap.c | int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 99 | fs/nfs/mmap.c | if (vma->vm_flags & VM_SHARED) /* only PAGE_COW or read-only supported now */ |
vma | 108 | fs/nfs/mmap.c | vma->vm_inode = inode; |
vma | 110 | fs/nfs/mmap.c | vma->vm_ops = &nfs_file_mmap; |
vma | 607 | fs/proc/array.c | struct vm_area_struct * vma = (*p)->mm->mmap; |
vma | 609 | fs/proc/array.c | while (vma) { |
vma | 610 | fs/proc/array.c | pgd_t *pgd = pgd_offset(*p, vma->vm_start); |
vma | 613 | fs/proc/array.c | statm_pgd_range(pgd, vma->vm_start, vma->vm_end, &pages, &shared, &dirty, &total); |
vma | 618 | fs/proc/array.c | if (vma->vm_flags & VM_EXECUTABLE) |
vma | 620 | fs/proc/array.c | else if (vma->vm_flags & VM_GROWSDOWN) |
vma | 622 | fs/proc/array.c | else if (vma->vm_end > 0x60000000) |
vma | 626 | fs/proc/array.c | vma = vma->vm_next; |
vma | 137 | fs/proc/link.c | struct vm_area_struct * vma = p->mm->mmap; |
vma | 138 | fs/proc/link.c | while (vma) { |
vma | 139 | fs/proc/link.c | if (vma->vm_flags & VM_EXECUTABLE) { |
vma | 140 | fs/proc/link.c | new_inode = vma->vm_inode; |
vma | 143 | fs/proc/link.c | vma = vma->vm_next; |
vma | 175 | fs/proc/mem.c | struct vm_area_struct * vma) |
vma | 203 | fs/proc/mem.c | stmp = vma->vm_offset; |
vma | 204 | fs/proc/mem.c | while (stmp < vma->vm_offset + (vma->vm_end - vma->vm_start)) { |
vma | 238 | fs/proc/mem.c | stmp = vma->vm_offset; |
vma | 239 | fs/proc/mem.c | dtmp = vma->vm_start; |
vma | 241 | fs/proc/mem.c | while (dtmp < vma->vm_end) { |
vma | 260 | fs/proc/mem.c | if ((vma->vm_flags & VM_WRITE) && !pte_write(*src_table)) |
vma | 515 | fs/super.c | struct vm_area_struct * vma; |
vma | 521 | fs/super.c | vma = find_vma(current, (unsigned long) data); |
vma | 522 | fs/super.c | if (!vma || (unsigned long) data < vma->vm_start) |
vma | 524 | fs/super.c | i = vma->vm_end - (unsigned long) data; |
vma | 384 | include/asm-alpha/pgtable.h | extern inline void update_mmu_cache(struct vm_area_struct * vma, |
vma | 328 | include/asm-i386/pgtable.h | extern inline void update_mmu_cache(struct vm_area_struct * vma, |
vma | 182 | include/linux/mm.h | extern void handle_mm_fault(struct vm_area_struct *vma, unsigned long address, int write_access); |
vma | 183 | include/linux/mm.h | extern void do_wp_page(struct vm_area_struct * vma, unsigned long address, int write_access); |
vma | 184 | include/linux/mm.h | extern void do_no_page(struct vm_area_struct * vma, unsigned long address, int write_access); |
vma | 116 | include/linux/nfs_fs.h | extern int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
vma | 65 | mm/filemap.c | static void filemap_sync_page(struct vm_area_struct * vma, |
vma | 87 | mm/filemap.c | static inline void filemap_sync_pte(pte_t * pte, struct vm_area_struct *vma, |
vma | 102 | mm/filemap.c | filemap_sync_page(vma, address - vma->vm_start, pte_page(page)); |
vma | 108 | mm/filemap.c | struct vm_area_struct *vma, unsigned long offset, unsigned int flags) |
vma | 127 | mm/filemap.c | filemap_sync_pte(pte, vma, address + offset, flags); |
vma | 135 | mm/filemap.c | struct vm_area_struct *vma, unsigned int flags) |
vma | 154 | mm/filemap.c | filemap_sync_pte_range(pmd, address, end - address, vma, offset, flags); |
vma | 160 | mm/filemap.c | static void filemap_sync(struct vm_area_struct * vma, unsigned long address, |
vma | 168 | mm/filemap.c | filemap_sync_pmd_range(dir, address, end - address, vma, flags); |
vma | 179 | mm/filemap.c | static void filemap_unmap(struct vm_area_struct *vma, unsigned long start, size_t len) |
vma | 181 | mm/filemap.c | filemap_sync(vma, start, len, MS_ASYNC); |
vma | 187 | mm/filemap.c | static void filemap_close(struct vm_area_struct * vma) |
vma | 189 | mm/filemap.c | filemap_sync(vma, vma->vm_start, vma->vm_end - vma->vm_start, MS_ASYNC); |
vma | 199 | mm/filemap.c | void filemap_swapout(struct vm_area_struct * vma, |
vma | 245 | mm/filemap.c | int generic_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
vma | 249 | mm/filemap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
vma | 256 | mm/filemap.c | if (vma->vm_flags & VM_SHARED) { |
vma | 257 | mm/filemap.c | if (vma->vm_flags & (VM_WRITE | VM_MAYWRITE)) { |
vma | 271 | mm/filemap.c | vma->vm_inode = inode; |
vma | 273 | mm/filemap.c | vma->vm_ops = ops; |
vma | 631 | mm/memory.c | void do_wp_page(struct vm_area_struct * vma, unsigned long address, |
vma | 640 | mm/memory.c | page_dir = pgd_offset(vma->vm_task,address); |
vma | 659 | mm/memory.c | vma->vm_task->mm->min_flt++; |
vma | 666 | mm/memory.c | ++vma->vm_task->mm->rss; |
vma | 668 | mm/memory.c | *page_table = pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))); |
vma | 675 | mm/memory.c | oom(vma->vm_task); |
vma | 686 | mm/memory.c | send_sig(SIGKILL, vma->vm_task, 1); |
vma | 690 | mm/memory.c | send_sig(SIGKILL, vma->vm_task, 1); |
vma | 694 | mm/memory.c | send_sig(SIGKILL, vma->vm_task, 1); |
vma | 706 | mm/memory.c | struct vm_area_struct * vma; |
vma | 716 | mm/memory.c | vma = find_vma(current, start); |
vma | 717 | mm/memory.c | if (!vma) |
vma | 719 | mm/memory.c | if (vma->vm_start <= start) |
vma | 721 | mm/memory.c | if (!(vma->vm_flags & VM_GROWSDOWN)) |
vma | 723 | mm/memory.c | if (vma->vm_end - start > current->rlim[RLIMIT_STACK].rlim_cur) |
vma | 731 | mm/memory.c | if (!(vma->vm_flags & VM_READ)) |
vma | 733 | mm/memory.c | if (vma->vm_end - start >= size) |
vma | 735 | mm/memory.c | next = vma->vm_next; |
vma | 736 | mm/memory.c | if (!next || vma->vm_end != next->vm_start) |
vma | 738 | mm/memory.c | vma = next; |
vma | 742 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 747 | mm/memory.c | if (vma->vm_end - start >= size) |
vma | 749 | mm/memory.c | if (!vma->vm_next || vma->vm_end != vma->vm_next->vm_start) |
vma | 751 | mm/memory.c | vma = vma->vm_next; |
vma | 752 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 764 | mm/memory.c | do_wp_page(vma, start, 1); |
vma | 769 | mm/memory.c | if (start < vma->vm_end) |
vma | 771 | mm/memory.c | vma = vma->vm_next; |
vma | 772 | mm/memory.c | if (!vma || vma->vm_start != start) |
vma | 774 | mm/memory.c | if (!(vma->vm_flags & VM_WRITE)) |
vma | 783 | mm/memory.c | static inline void get_empty_page(struct vm_area_struct * vma, pte_t * page_table) |
vma | 788 | mm/memory.c | oom(vma->vm_task); |
vma | 792 | mm/memory.c | put_page(page_table, pte_mkwrite(mk_pte(tmp, vma->vm_page_prot))); |
vma | 990 | mm/memory.c | static inline void do_swap_page(struct vm_area_struct * vma, unsigned long address, |
vma | 995 | mm/memory.c | if (!vma->vm_ops || !vma->vm_ops->swapin) { |
vma | 996 | mm/memory.c | swap_in(vma, page_table, pte_val(entry), write_access); |
vma | 999 | mm/memory.c | page = vma->vm_ops->swapin(vma, address - vma->vm_start + vma->vm_offset, pte_val(entry)); |
vma | 1004 | mm/memory.c | if (mem_map[MAP_NR(pte_page(page))] > 1 && !(vma->vm_flags & VM_SHARED)) |
vma | 1006 | mm/memory.c | ++vma->vm_task->mm->rss; |
vma | 1007 | mm/memory.c | ++vma->vm_task->mm->maj_flt; |
vma | 1018 | mm/memory.c | void do_no_page(struct vm_area_struct * vma, unsigned long address, |
vma | 1025 | mm/memory.c | page_table = get_empty_pgtable(vma->vm_task,address); |
vma | 1032 | mm/memory.c | do_swap_page(vma, address, page_table, entry, write_access); |
vma | 1036 | mm/memory.c | if (!vma->vm_ops || !vma->vm_ops->nopage) { |
vma | 1037 | mm/memory.c | ++vma->vm_task->mm->rss; |
vma | 1038 | mm/memory.c | ++vma->vm_task->mm->min_flt; |
vma | 1039 | mm/memory.c | get_empty_page(vma, page_table); |
vma | 1043 | mm/memory.c | if (share_page(vma, address, write_access, page)) { |
vma | 1044 | mm/memory.c | ++vma->vm_task->mm->min_flt; |
vma | 1045 | mm/memory.c | ++vma->vm_task->mm->rss; |
vma | 1053 | mm/memory.c | ++vma->vm_task->mm->maj_flt; |
vma | 1054 | mm/memory.c | ++vma->vm_task->mm->rss; |
vma | 1060 | mm/memory.c | page = vma->vm_ops->nopage(vma, address, page, |
vma | 1061 | mm/memory.c | write_access && !(vma->vm_flags & VM_SHARED)); |
vma | 1062 | mm/memory.c | if (share_page(vma, address, write_access, 0)) { |
vma | 1076 | mm/memory.c | entry = mk_pte(page, vma->vm_page_prot); |
vma | 1079 | mm/memory.c | } else if (mem_map[MAP_NR(page)] > 1 && !(vma->vm_flags & VM_SHARED)) |
vma | 1097 | mm/memory.c | static inline void handle_pte_fault(struct vm_area_struct * vma, unsigned long address, |
vma | 1101 | mm/memory.c | do_no_page(vma, address, write_access); |
vma | 1111 | mm/memory.c | do_wp_page(vma, address, write_access); |
vma | 1114 | mm/memory.c | void handle_mm_fault(struct vm_area_struct * vma, unsigned long address, |
vma | 1121 | mm/memory.c | pgd = pgd_offset(vma->vm_task, address); |
vma | 1128 | mm/memory.c | handle_pte_fault(vma, address, write_access, pte); |
vma | 1129 | mm/memory.c | update_mmu_cache(vma, address, *pte); |
vma | 1132 | mm/memory.c | oom(vma->vm_task); |
vma | 48 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 109 | mm/mmap.c | vma = (struct vm_area_struct *)kmalloc(sizeof(struct vm_area_struct), |
vma | 111 | mm/mmap.c | if (!vma) |
vma | 114 | mm/mmap.c | vma->vm_task = current; |
vma | 115 | mm/mmap.c | vma->vm_start = addr; |
vma | 116 | mm/mmap.c | vma->vm_end = addr + len; |
vma | 117 | mm/mmap.c | vma->vm_flags = prot & (VM_READ | VM_WRITE | VM_EXEC); |
vma | 118 | mm/mmap.c | vma->vm_flags |= flags & (VM_GROWSDOWN | VM_DENYWRITE | VM_EXECUTABLE); |
vma | 122 | mm/mmap.c | vma->vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
vma | 124 | mm/mmap.c | vma->vm_flags |= VM_SHARED | VM_MAYSHARE; |
vma | 136 | mm/mmap.c | vma->vm_flags &= ~(VM_MAYWRITE | VM_SHARED); |
vma | 139 | mm/mmap.c | vma->vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
vma | 140 | mm/mmap.c | vma->vm_page_prot = protection_map[vma->vm_flags & 0x0f]; |
vma | 141 | mm/mmap.c | vma->vm_ops = NULL; |
vma | 142 | mm/mmap.c | vma->vm_offset = off; |
vma | 143 | mm/mmap.c | vma->vm_inode = NULL; |
vma | 144 | mm/mmap.c | vma->vm_pte = 0; |
vma | 149 | mm/mmap.c | error = file->f_op->mmap(file->f_inode, file, vma); |
vma | 151 | mm/mmap.c | error = anon_map(NULL, NULL, vma); |
vma | 154 | mm/mmap.c | kfree(vma); |
vma | 157 | mm/mmap.c | insert_vm_struct(current, vma); |
vma | 158 | mm/mmap.c | merge_segments(current, vma->vm_start, vma->vm_end); |
vma | 245 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 247 | mm/mmap.c | for (vma = task->mm->mmap ; ; vma = vma->vm_next) { |
vma | 248 | mm/mmap.c | if (!vma) |
vma | 250 | mm/mmap.c | if (vma->vm_end > addr) |
vma | 251 | mm/mmap.c | return vma; |
vma | 275 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 278 | mm/mmap.c | for (vma = task->mm->mmap; vma; vma = vma->vm_next) { |
vma | 279 | mm/mmap.c | if (end_addr <= vma->vm_start) |
vma | 281 | mm/mmap.c | if (start_addr < vma->vm_end) |
vma | 282 | mm/mmap.c | return vma; |
vma | 286 | mm/mmap.c | vma = find_vma(task,start_addr); |
vma | 287 | mm/mmap.c | if (!vma || end_addr <= vma->vm_start) |
vma | 289 | mm/mmap.c | return vma; |
vma | 527 | mm/mmap.c | static void printk_list (struct vm_area_struct * vma) |
vma | 530 | mm/mmap.c | while (vma) { |
vma | 531 | mm/mmap.c | printk("%08lX-%08lX", vma->vm_start, vma->vm_end); |
vma | 532 | mm/mmap.c | vma = vma->vm_next; |
vma | 533 | mm/mmap.c | if (!vma) |
vma | 792 | mm/mmap.c | struct vm_area_struct * vma; |
vma | 795 | mm/mmap.c | for (vma = task->mm->mmap; vma; vma = vma->vm_next) |
vma | 796 | mm/mmap.c | avl_insert(vma, &task->mm->mmap_avl); |
vma | 970 | mm/mmap.c | static int anon_map(struct inode *ino, struct file * file, struct vm_area_struct * vma) |
vma | 972 | mm/mmap.c | if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot)) |
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 | 280 | mm/swap.c | void swap_in(struct vm_area_struct * vma, pte_t * page_table, |
vma | 300 | mm/swap.c | vma->vm_task->mm->rss++; |
vma | 301 | mm/swap.c | vma->vm_task->mm->maj_flt++; |
vma | 303 | mm/swap.c | *page_table = mk_pte(page, vma->vm_page_prot); |
vma | 306 | mm/swap.c | *page_table = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); |
vma | 322 | mm/swap.c | static inline int try_to_swap_out(struct vm_area_struct* vma, unsigned long address, pte_t * page_table) |
vma | 343 | mm/swap.c | if (vma->vm_ops && vma->vm_ops->swapout) { |
vma | 344 | mm/swap.c | vma->vm_task->mm->rss--; |
vma | 345 | mm/swap.c | vma->vm_ops->swapout(vma, address-vma->vm_start, page_table); |
vma | 349 | mm/swap.c | vma->vm_task->mm->rss--; |
vma | 363 | mm/swap.c | vma->vm_task->mm->rss--; |
vma | 369 | mm/swap.c | vma->vm_task->mm->rss--; |
vma | 404 | mm/swap.c | static inline int swap_out_pmd(struct vm_area_struct * vma, pmd_t *dir, |
vma | 426 | mm/swap.c | vma->vm_task->mm->swap_address = address + PAGE_SIZE; |
vma | 427 | mm/swap.c | result = try_to_swap_out(vma, address, pte); |
vma | 436 | mm/swap.c | static inline int swap_out_pgd(struct vm_area_struct * vma, pgd_t *dir, |
vma | 457 | mm/swap.c | int result = swap_out_pmd(vma, pmd, address, end); |
vma | 466 | mm/swap.c | static int swap_out_vma(struct vm_area_struct * vma, pgd_t *pgdir, |
vma | 473 | mm/swap.c | if (vma->vm_flags & VM_SHM) |
vma | 476 | mm/swap.c | end = vma->vm_end; |
vma | 478 | mm/swap.c | int result = swap_out_pgd(vma, pgdir, start, end); |
vma | 490 | mm/swap.c | struct vm_area_struct* vma; |
vma | 501 | mm/swap.c | vma = find_vma(p, address); |
vma | 502 | mm/swap.c | if (!vma) |
vma | 504 | mm/swap.c | if (address < vma->vm_start) |
vma | 505 | mm/swap.c | address = vma->vm_start; |
vma | 508 | mm/swap.c | int result = swap_out_vma(vma, pgd_offset(p, address), address); |
vma | 511 | mm/swap.c | vma = vma->vm_next; |
vma | 512 | mm/swap.c | if (!vma) |
vma | 514 | mm/swap.c | address = vma->vm_start; |
vma | 833 | mm/swap.c | static inline int unuse_pte(struct vm_area_struct * vma, unsigned long address, |
vma | 859 | mm/swap.c | *dir = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); |
vma | 860 | mm/swap.c | ++vma->vm_task->mm->rss; |
vma | 865 | mm/swap.c | static inline int unuse_pmd(struct vm_area_struct * vma, pmd_t *dir, |
vma | 886 | mm/swap.c | if (unuse_pte(vma, offset+address-vma->vm_start, pte, type, page)) |
vma | 894 | mm/swap.c | static inline int unuse_pgd(struct vm_area_struct * vma, pgd_t *dir, |
vma | 915 | mm/swap.c | if (unuse_pmd(vma, pmd, address, end - address, offset, type, page)) |
vma | 923 | mm/swap.c | static int unuse_vma(struct vm_area_struct * vma, pgd_t *pgdir, |
vma | 928 | mm/swap.c | if (unuse_pgd(vma, pgdir, start, end - start, type, page)) |
vma | 938 | mm/swap.c | struct vm_area_struct* vma; |
vma | 943 | mm/swap.c | vma = p->mm->mmap; |
vma | 944 | mm/swap.c | while (vma) { |
vma | 945 | mm/swap.c | pgd_t * pgd = pgd_offset(p, vma->vm_start); |
vma | 946 | mm/swap.c | if (unuse_vma(vma, pgd, vma->vm_start, vma->vm_end, type, page)) |
vma | 948 | mm/swap.c | vma = vma->vm_next; |