Home
last modified time | relevance | path

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

123

/linux-6.3-rc2/tools/testing/selftests/powerpc/mm/
A Dexec_prot.c73 if (mprotect(insns, pgsize, PROT_READ | PROT_WRITE | PROT_EXEC)) { in segv_handler()
98 FAIL_IF(mprotect(insns, pgsize, rights) != 0); in check_exec_fault()
173 FAIL_IF(mprotect(insns, pgsize, PROT_EXEC) != 0); in test()
185 FAIL_IF(mprotect(insns, pgsize, PROT_EXEC) != 0); in test()
A 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()
A Dtlbie_test.c577 mprotect(map1, size, PROT_READ); in mem_snapshot_fn()
597 mprotect(map1, size, PROT_READ|PROT_WRITE); in mem_snapshot_fn()
/linux-6.3-rc2/arch/um/kernel/
A 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()
195 (last->u.mprotect.addr + last->u.mprotect.len == addr) && in add_mprotect()
196 (last->u.mprotect.prot == prot)) { in add_mprotect()
197 last->u.mprotect.len += len; in add_mprotect()
209 .u = { .mprotect = { .addr = addr, in add_mprotect()
/linux-6.3-rc2/Documentation/translations/zh_CN/core-api/
A Dprotection-keys.rst78 内核试图使保护密钥与普通的mprotect()的行为一致。例如,如果你这样做::
80 mprotect(ptr, size, PROT_NONE);
99 将被设置为SEGV_PKERR,而当违反普通的mprotect()权限时,则是SEGV_ACCERR。
/linux-6.3-rc2/tools/testing/selftests/mm/
A Dmdwe_test.c130 ret = mprotect(self->p, self->size, PROT_READ | PROT_EXEC); in TEST_F()
141 ret = mprotect(self->p, self->size, PROT_READ | PROT_EXEC); in TEST_F()
156 ret = mprotect(self->p, self->size, PROT_WRITE | PROT_EXEC); in TEST_F()
193 ret = mprotect(self->p, self->size, PROT_EXEC | PROT_BTI); in TEST_F()
A Dcow.c256 ret = mprotect(mem, size, PROT_READ); in do_test_cow_in_parent()
257 ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); in do_test_cow_in_parent()
487 ret = mprotect(mem, size, PROT_READ); in do_test_iouring()
489 ret |= mprotect(mem, size, PROT_READ | PROT_WRITE); in do_test_iouring()
647 ret = mprotect(mem, size, PROT_READ); in do_test_ro_pin()
649 ret |= mprotect(mem, size, PROT_READ | PROT_WRITE); in do_test_ro_pin()
843 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_run_with_thp()
848 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_run_with_thp()
1212 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_test_anon_thp_collapse()
1217 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_test_anon_thp_collapse()
A Dsoft-dirty.c158 mprotect(map, pagesize, PROT_READ); in test_mprotect()
162 mprotect(map, pagesize, PROT_READ|PROT_WRITE); in test_mprotect()
A Dhmm-tests.c324 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
387 ret = mprotect(buffer->ptr, size, PROT_NONE); in TEST_F()
395 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
504 ret = mprotect(buffer->ptr, size, PROT_WRITE | PROT_READ); in TEST_F()
1186 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F()
1194 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F()
1199 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F()
1496 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F()
1616 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
1670 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F()
[all …]
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/
A Dringbuf.c112 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in ringbuf_subtest()
136 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
137 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
146 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
147 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
A Dmmap.c135 err = mprotect(map_mmaped, map_sz, PROT_READ); in test_mmap()
152 err = mprotect(map_mmaped, map_sz, PROT_WRITE); in test_mmap()
155 err = mprotect(map_mmaped, map_sz, PROT_EXEC); in test_mmap()
A Duser_ringbuf.c113 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_cons_pos_protect"); in test_user_ringbuf_mappings()
114 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in test_user_ringbuf_mappings()
124 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_prod_pos_protect"); in test_user_ringbuf_mappings()
133 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_data_protect"); in test_user_ringbuf_mappings()
A Dtest_lsm.c32 ret = mprotect(GET_PAGE_ADDR(buf, sz), sz, in stack_mprotect()
/linux-6.3-rc2/tools/testing/selftests/powerpc/primitives/
A 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-6.3-rc2/Documentation/ABI/obsolete/
A 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-6.3-rc2/Documentation/sparc/
A 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-6.3-rc2/Documentation/core-api/
A Dprotection-keys.rst75 behavior of a plain mprotect(). For instance if you do this::
77 mprotect(ptr, size, PROT_NONE);
98 the plain mprotect() permissions are violated.
/linux-6.3-rc2/tools/testing/selftests/kvm/s390x/
A Dtprot.c218 mprotect(addr_gva2hva(vm, (vm_vaddr_t)pages), PAGE_SIZE * 2, PROT_READ); in main()
231 mprotect(addr_gva2hva(vm, (vm_vaddr_t)0), PAGE_SIZE, PROT_READ); in main()
/linux-6.3-rc2/Documentation/translations/zh_CN/mm/
A Dovercommit-accounting.rst74 * 我们核算mprotect在提交中的变化
/linux-6.3-rc2/arch/x86/um/os-Linux/
A Dtask_size.c53 } else if (mprotect(address, UM_KERN_PAGE_SIZE, in page_ok()
/linux-6.3-rc2/tools/testing/selftests/powerpc/signal/
A Dsigreturn_vdso.c114 mprotect((void *)low, size, PROT_READ|PROT_WRITE|PROT_EXEC); in test_sigreturn_vdso()
/linux-6.3-rc2/tools/testing/selftests/arm64/mte/
A Dcheck_mmap_options.c147 if (mprotect(map_ptr, map_size, prot_flag)) { in check_clear_prot_mte_flag()
170 if (mprotect(map_ptr, map_size, prot_flag)) { in check_clear_prot_mte_flag()
/linux-6.3-rc2/arch/um/os-Linux/
A Dutil.c23 if (mprotect((void *) address, UM_THREAD_SIZE, in stack_protections()
/linux-6.3-rc2/tools/testing/selftests/powerpc/copyloops/
A Dexc_validate.c98 if (mprotect(p + page_size, page_size, PROT_NONE)) { in test_copy_exception()
/linux-6.3-rc2/mm/
A Dmprotect.c825 if (vma->vm_ops && vma->vm_ops->mprotect) { in do_mprotect_pkey()
826 error = vma->vm_ops->mprotect(vma, nstart, tmp, newflags); in do_mprotect_pkey()
849 SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, in SYSCALL_DEFINE3() argument

Completed in 61 milliseconds

123