Searched refs:mprotect (Results 1 - 33 of 33) sorted by relevance

/linux-4.1.27/tools/testing/selftests/powerpc/primitives/
H A Dload_unaligned_zeropad.c3 * pages and uses mprotect to prevent access to the second page and
8 * performed while access to the second page is enabled via mprotect.
38 if (mprotect(mem_region + page_size, page_size, PROT_NONE)) { protect_region()
39 perror("mprotect"); protect_region()
48 if (mprotect(mem_region + page_size, page_size, PROT_READ|PROT_WRITE)) { unprotect_region()
49 perror("mprotect"); unprotect_region()
/linux-4.1.27/include/uapi/asm-generic/
H A Dmman-common.h14 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
15 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/linux-4.1.27/arch/um/kernel/
H A Dtlb.c36 } mprotect; member in union:host_vm_change::host_vm_op::__anon2946
72 ret = protect(hvc->id, op->u.mprotect.addr, do_ops()
73 op->u.mprotect.len, op->u.mprotect.prot, do_ops()
161 (last->u.mprotect.addr + last->u.mprotect.len == addr) && add_mprotect()
162 (last->u.mprotect.prot == prot)) { add_mprotect()
163 last->u.mprotect.len += len; add_mprotect()
175 .u = { .mprotect = { .addr = addr, add_mprotect()
/linux-4.1.27/arch/parisc/include/uapi/asm/
H A Dmman.h9 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
10 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/linux-4.1.27/arch/alpha/include/uapi/asm/
H A Dmman.h9 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
10 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/linux-4.1.27/mm/
H A DMakefile10 mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
H A Dmprotect.c2 * mm/mprotect.c
335 SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, SYSCALL_DEFINE3()
H A Dmmap.c746 * perhaps the one after too (mprotect case 6). vma_adjust()
755 * mprotect case 5 shifting the boundary up. vma_adjust()
764 * mprotect case 4 shifting the boundary down. vma_adjust()
772 * Easily overlooked: when mprotect shifts the boundary, vma_adjust()
901 * In mprotect's case 6 (see comments on vma_merge), vma_adjust()
1010 * called for mprotect, it is certain to be already mapped (either at
1015 * The following mprotect cases have to be considered, where AAAA is
1112 * in things that mprotect may change.
1168 * mprotect.
1196 * We're trying to allow mprotect remerging later on, find_mergeable_anon_vma()
H A Dswap.c840 * In a workload with many unevictable page such as mprotect, deactivate_file_page()
H A Drmap.c148 * reason for splitting a vma has been mprotect()), or we
H A Dhugetlb.c3584 * to reserve the full area even if read-only as mprotect() may be hugetlb_reserve_pages()
/linux-4.1.27/include/linux/
H A Dmman.h47 * This is called from mprotect(). PROT_GROWSDOWN and PROT_GROWSUP have
H A Drmap.h19 * in mprotect), the mapping field of an anonymous page cannot point
H A Dmm.h119 /* mprotect() hardcodes VM_MAYREAD >> 4 == VM_READ, and so for r/w/x bits. */ set_max_mapnr()
120 #define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */ set_max_mapnr()
/linux-4.1.27/tools/testing/selftests/memfd/
H A Dmemfd_test.c292 * mprotect(PROT_WRITE) allows writing */ mfd_assert_write()
304 r = mprotect(p, MFD_DEF_SIZE, PROT_READ | PROT_WRITE); mfd_assert_write()
306 printf("mprotect() failed: %m\n"); mfd_assert_write()
361 /* Verify PROT_READ with MAP_SHARED with a following mprotect is not mfd_fail_write()
370 r = mprotect(p, MFD_DEF_SIZE, PROT_READ | PROT_WRITE); mfd_fail_write()
372 printf("mmap()+mprotect() didn't fail as expected\n"); mfd_fail_write()
/linux-4.1.27/arch/xtensa/include/uapi/asm/
H A Dmman.h30 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
31 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end fo growsup vma */
/linux-4.1.27/arch/mips/include/uapi/asm/
H A Dmman.h23 #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
24 #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
/linux-4.1.27/arch/x86/um/os-Linux/
H A Dtask_size.c52 } else if (mprotect(address, UM_KERN_PAGE_SIZE, page_ok()
/linux-4.1.27/arch/tile/mm/
H A Delf.c140 * interrupt vectors always involves an mprotect. arch_setup_additional_pages()
/linux-4.1.27/arch/um/os-Linux/
H A Dutil.c20 if (mprotect((void *) address, UM_THREAD_SIZE, stack_protections()
H A Dprocess.c153 if (mprotect(addr, len, prot) < 0) os_protect_memory()
/linux-4.1.27/arch/powerpc/include/asm/
H A Dsystbl.h132 SYSCALL_SPU(mprotect)
/linux-4.1.27/arch/tile/include/asm/
H A Dpgtable.h86 * all the bits, and to mask away the cache control bits for mprotect.
306 * If we are doing an mprotect(), just accept the new vma->vm_page_prot
/linux-4.1.27/arch/s390/kernel/
H A Dcompat_wrapper.c104 COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot);
/linux-4.1.27/arch/parisc/kernel/
H A Dsyscall_table.S206 ENTRY_SAME(mprotect) /* 125 */
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_file_ops.c1009 /* don't allow them to later change with mprotect */ ipath_mmap_mem()
1088 * don't allow them to later change to readable with mprotect (for when mmap_piobufs()
1127 /* don't allow them to later change to writeable with mprotect */ mmap_rcvegrbufs()
1218 * with mprotect. mmap_kvaddr()
/linux-4.1.27/drivers/infiniband/hw/qib/
H A Dqib_file_ops.c756 /* don't allow them to later change with mprotect */ qib_mmap_mem()
834 * don't allow them to later change to readable with mprotect (for when mmap_piobufs()
878 /* don't allow them to later change to writeable with mprotect */ mmap_rcvegrbufs()
969 * with mprotect. mmap_kvaddr()
/linux-4.1.27/arch/x86/include/asm/
H A Dpgtable.h373 /* mprotect needs to preserve PAT bits when updating vm_page_prot */
/linux-4.1.27/security/selinux/
H A Dselinuxfs.c258 /* disallow mprotect() turns it into writable */ sel_mmap_handle_status()
483 /* do not allow mprotect to make mapping writable */ sel_mmap_policy()
/linux-4.1.27/ipc/
H A Dshm.c1305 * a fragment created by mprotect() and/or munmap(), or it SYSCALL_DEFINE1()
/linux-4.1.27/arch/ia64/kernel/
H A Dfsys.S683 data8 0 // mprotect // 1155
/linux-4.1.27/tools/lguest/
H A Dlguest.c356 if (mprotect(addr + getpagesize(), getpagesize() * num, map_zeroed_pages()
358 err(1, "mprotect rw %u pages failed", num); map_zeroed_pages()
/linux-4.1.27/tools/perf/
H A Dbuiltin-trace.c1030 { .name = "mprotect", .errmsg = true,

Completed in 1182 milliseconds