Home
last modified time | relevance | path

Searched refs:mprotect (Results 1 – 25 of 49) sorted by relevance

12

/Linux-v5.10/arch/um/kernel/
Dtlb.c36 } mprotect; member
97 op->u.mprotect.addr, in do_ops()
98 op->u.mprotect.len, in do_ops()
99 op->u.mprotect.prot, in do_ops()
103 (void *) op->u.mprotect.addr, in do_ops()
104 op->u.mprotect.len, in do_ops()
198 (last->u.mprotect.addr + last->u.mprotect.len == addr) && in add_mprotect()
199 (last->u.mprotect.prot == prot)) { in add_mprotect()
200 last->u.mprotect.len += len; in add_mprotect()
212 .u = { .mprotect = { .addr = addr, in add_mprotect()
/Linux-v5.10/tools/testing/selftests/powerpc/primitives/
Dload_unaligned_zeropad.c43 if (mprotect(mem_region + page_size, page_size, PROT_NONE)) { in protect_region()
53 if (mprotect(mem_region + page_size, page_size, PROT_READ|PROT_WRITE)) { in unprotect_region()
/Linux-v5.10/Documentation/ABI/obsolete/
Dsysfs-selinux-checkreqprot8 to check the protection requested by userspace for mmap/mprotect
20 check the actual protections being applied upon mmap/mprotect calls.
/Linux-v5.10/Documentation/sparc/
Dadi.rst39 ADI is enabled on a set of pages using mprotect() with PROT_ADI flag.
83 range, enable ADI on the range using mprotect() and set version tags
84 for the entire range. mprotect() ensures range is aligned to page size
226 if (mprotect(shmaddr, BUFFER_SIZE, PROT_READ|PROT_WRITE|PROT_ADI)) {
227 perror("mprotect failed");
270 if (mprotect(shmaddr, BUFFER_SIZE, PROT_READ|PROT_WRITE)) {
271 perror("mprotect failed");
/Linux-v5.10/tools/testing/selftests/vm/
Dhmm-tests.c257 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
320 ret = mprotect(buffer->ptr, size, PROT_NONE); in TEST_F()
328 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
437 ret = mprotect(buffer->ptr, size, PROT_WRITE | PROT_READ); in TEST_F()
1024 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F()
1032 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F()
1037 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F()
1042 ret = mprotect(buffer->ptr + 4 * self->page_size, 2 * self->page_size, in TEST_F()
1283 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F()
1291 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F()
[all …]
Dprotection_keys.c1449 ret = mprotect(p1, PAGE_SIZE, PROT_EXEC); in test_implicit_mprotect_exec_only_memory()
1466 ret = mprotect(p1, PAGE_SIZE, PROT_NONE); in test_implicit_mprotect_exec_only_memory()
1469 ret = mprotect(p1, PAGE_SIZE, PROT_READ|PROT_EXEC); in test_implicit_mprotect_exec_only_memory()
/Linux-v5.10/Documentation/core-api/
Dprotection-keys.rst77 behavior of a plain mprotect(). For instance if you do this::
79 mprotect(ptr, size, PROT_NONE);
100 the plain mprotect() permissions are violated.
/Linux-v5.10/tools/testing/selftests/powerpc/mm/
Dpkey_exec_prot.c62 if (mprotect(insns, pgsize, PROT_READ | PROT_WRITE)) { in segv_handler()
84 if (mprotect(insns, pgsize, PROT_EXEC)) { in segv_handler()
Dtlbie_test.c578 mprotect(map1, size, PROT_READ); in mem_snapshot_fn()
598 mprotect(map1, size, PROT_READ|PROT_WRITE); in mem_snapshot_fn()
Dpkey_siginfo.c83 mprotect(pgstart, pgsize, PROT_EXEC)) in segv_handler()
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dmmap.c121 err = mprotect(map_mmaped, map_sz, PROT_READ); in test_mmap()
138 err = mprotect(map_mmaped, map_sz, PROT_WRITE); in test_mmap()
141 err = mprotect(map_mmaped, map_sz, PROT_EXEC); in test_mmap()
Dtest_lsm.c33 ret = mprotect(GET_PAGE_ADDR(buf, sz), sz, in stack_mprotect()
/Linux-v5.10/arch/x86/um/os-Linux/
Dtask_size.c53 } else if (mprotect(address, UM_KERN_PAGE_SIZE, in page_ok()
/Linux-v5.10/arch/um/os-Linux/
Dutil.c21 if (mprotect((void *) address, UM_THREAD_SIZE, in stack_protections()
Dprocess.c159 if (mprotect(addr, len, prot) < 0) in os_protect_memory()
/Linux-v5.10/tools/testing/selftests/powerpc/signal/
Dsigreturn_vdso.c114 mprotect((void *)low, size, PROT_READ|PROT_WRITE|PROT_EXEC); in test_sigreturn_vdso()
/Linux-v5.10/tools/testing/selftests/arm64/mte/
Dcheck_mmap_options.c148 if (mprotect(map_ptr, map_size, prot_flag)) { in check_clear_prot_mte_flag()
171 if (mprotect(map_ptr, map_size, prot_flag)) { in check_clear_prot_mte_flag()
Dmte_common_util.c150 if (mprotect(ptr, entire_size, prot_flag | PROT_MTE)) { in __mte_allocate_memory_range()
/Linux-v5.10/Documentation/arm64/
Dmemory-tagging-extension.rst38 ``mmap()`` and ``mprotect()``:
52 be cleared by ``mprotect()``.
275 if (mprotect(a, page_sz, PROT_READ | PROT_WRITE | PROT_MTE)) {
276 perror("mprotect() failed");
/Linux-v5.10/tools/testing/selftests/powerpc/copyloops/
Dexc_validate.c98 if (mprotect(p + page_size, page_size, PROT_NONE)) { in test_copy_exception()
/Linux-v5.10/Documentation/vm/
Dovercommit-accounting.rst75 * We account mprotect changes in commit
/Linux-v5.10/mm/
DMakefile39 mlock.o mmap.o mmu_gather.o mprotect.o mremap.o \
/Linux-v5.10/tools/testing/selftests/memfd/
Dmemfd_test.c387 r = mprotect(p, mfd_def_size, PROT_READ | PROT_WRITE); in mfd_assert_write()
453 r = mprotect(p, mfd_def_size, PROT_READ | PROT_WRITE); in mfd_fail_write()
/Linux-v5.10/kernel/
Dsys_ni.c275 COND_SYSCALL(mprotect);
/Linux-v5.10/Documentation/admin-guide/mm/
Duserfaultfd.rst34 management of mremap/mprotect is that the userfaults in all their
136 This is equivalent to (but faster than) using mprotect and a SIGSEGV
140 Instead of using mprotect(2) you use

12