/openbmc/qemu/tests/tcg/s390x/ |
H A D | mvc.c | 46 if (mprotect(src + 4096, 4096, PROT_NONE) || in main() 47 mprotect(dst + 4096, 4096, PROT_NONE)) { in main() 74 if (mprotect(src + 4096, 4096, PROT_READ | PROT_WRITE) || in main() 75 mprotect(dst + 4096, 4096, PROT_READ | PROT_WRITE)) { in main()
|
H A D | precise-smc-user.c | 21 err = mprotect(aligned_smc, smc_end - aligned_smc, in main()
|
/openbmc/linux/arch/um/kernel/ |
H A D | tlb.c | 36 } 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()
|
/openbmc/linux/tools/testing/selftests/powerpc/mm/ |
H A D | exec_prot.c | 73 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()
|
H A D | pkey_exec_prot.c | 62 if (mprotect(insns, pgsize, PROT_READ | PROT_WRITE)) { in segv_handler() 84 if (mprotect(insns, pgsize, PROT_EXEC)) { in segv_handler()
|
/openbmc/linux/Documentation/translations/zh_CN/core-api/ |
H A D | protection-keys.rst | 78 内核试图使保护密钥与普通的mprotect()的行为一致。例如,如果你这样做:: 80 mprotect(ptr, size, PROT_NONE); 99 将被设置为SEGV_PKERR,而当违反普通的mprotect()权限时,则是SEGV_ACCERR。
|
/openbmc/qemu/tests/tcg/i386/ |
H A D | test-flags.c | 14 mprotect(addr, 4096, PROT_READ|PROT_WRITE); in sigsegv() 25 mprotect(addr, 4096, PROT_READ); in main()
|
/openbmc/qemu/tests/tcg/multiarch/ |
H A D | prot-none.c | 28 err = mprotect(p, pagesize * 2, PROT_NONE); in main() 33 err = mprotect(p, pagesize * 2, PROT_READ); in main()
|
H A D | noexec.c.inc | 81 if (mprotect(page_base, page_size, 83 handle_err("mprotect"); 98 if (mprotect(page_base, page_size, PROT_NONE) < 0) { 99 handle_err("mprotect");
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | mdwe_test.c | 130 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() 189 ret = mprotect(self->p, self->size, PROT_EXEC | PROT_BTI); in TEST_F()
|
H A D | mkdirty.c | 173 if (mprotect(mem, pagesize, PROT_READ)) { in test_page_migration() 206 if (mprotect(mem, thpsize, PROT_READ)) { in test_page_migration_thp() 245 if (mprotect(mem, thpsize, PROT_READ)) { in test_pte_mapped_thp() 257 if (mprotect(mem + thpsize - pagesize, pagesize, in test_pte_mapped_thp()
|
H A D | cow.c | 196 ret = mprotect(mem, size, PROT_READ); in do_test_cow_in_parent() 197 ret |= mprotect(mem, size, PROT_READ|PROT_WRITE); in do_test_cow_in_parent() 427 ret = mprotect(mem, size, PROT_READ); in do_test_iouring() 429 ret |= mprotect(mem, size, PROT_READ | PROT_WRITE); in do_test_iouring() 587 ret = mprotect(mem, size, PROT_READ); in do_test_ro_pin() 589 ret |= mprotect(mem, size, PROT_READ | PROT_WRITE); in do_test_ro_pin() 783 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_run_with_thp() 788 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_run_with_thp() 1152 ret = mprotect(mem + pagesize, pagesize, PROT_READ); in do_test_anon_thp_collapse() 1157 ret = mprotect(mem + pagesize, pagesize, PROT_READ | PROT_WRITE); in do_test_anon_thp_collapse()
|
H A D | soft-dirty.c | 161 mprotect(map, pagesize, PROT_READ); in test_mprotect() 165 mprotect(map, pagesize, PROT_READ|PROT_WRITE); in test_mprotect()
|
H A D | hmm-tests.c | 329 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F() 392 ret = mprotect(buffer->ptr, size, PROT_NONE); in TEST_F() 400 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F() 509 ret = mprotect(buffer->ptr, size, PROT_WRITE | PROT_READ); in TEST_F() 1191 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F() 1199 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F() 1204 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F() 1209 ret = mprotect(buffer->ptr + 4 * self->page_size, 2 * self->page_size, in TEST_F() 1501 ret = mprotect(buffer->ptr + 2 * self->page_size, self->page_size, in TEST_F() 1509 ret = mprotect(buffer->ptr + 3 * self->page_size, self->page_size, in TEST_F() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | ringbuf.c | 112 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()
|
H A D | mmap.c | 135 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()
|
/openbmc/qemu/tests/tcg/multiarch/linux/ |
H A D | linux-madvise.c | 16 ret = mprotect(page, pagesize, PROT_READ | PROT_WRITE); in test_anonymous() 51 ret = mprotect(page, pagesize, PROT_READ | PROT_WRITE); in test_file()
|
/openbmc/linux/tools/testing/selftests/powerpc/primitives/ |
H A D | load_unaligned_zeropad.c | 43 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()
|
/openbmc/qemu/bsd-user/ |
H A D | mmap.c | 99 ret = mprotect(g2h_untagged(host_start), in target_mprotect() 110 ret = mprotect(g2h_untagged(host_end - qemu_host_page_size), in target_mprotect() 119 ret = mprotect(g2h_untagged(host_start), host_end - host_start, prot); in target_mprotect() 224 mprotect(host_start, qemu_host_page_size, prot1 | PROT_WRITE); in mmap_frag() 233 mprotect(host_start, qemu_host_page_size, prot_new); in mmap_frag() 236 mprotect(host_start, qemu_host_page_size, prot_new); in mmap_frag()
|
/openbmc/linux/Documentation/ABI/removed/ |
H A D | sysfs-selinux-checkreqprot | 11 to check the protection requested by userspace for mmap/mprotect 23 check the actual protections being applied upon mmap/mprotect calls.
|
/openbmc/linux/Documentation/arch/sparc/ |
H A D | adi.rst | 39 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");
|
/openbmc/linux/Documentation/core-api/ |
H A D | protection-keys.rst | 75 behavior of a plain mprotect(). For instance if you do this:: 77 mprotect(ptr, size, PROT_NONE); 98 the plain mprotect() permissions are violated.
|
/openbmc/linux/tools/testing/selftests/kvm/s390x/ |
H A D | tprot.c | 219 mprotect(addr_gva2hva(vm, (vm_vaddr_t)pages), PAGE_SIZE * 2, PROT_READ); in main() 232 mprotect(addr_gva2hva(vm, (vm_vaddr_t)0), PAGE_SIZE, PROT_READ); in main()
|
/openbmc/qemu/tests/tcg/aarch64/ |
H A D | lse2-fault.c | 28 if (mprotect(p + psize, psize, PROT_NONE) < 0) { in main()
|
/openbmc/qemu/hw/misc/ |
H A D | pc-testdev.c | 133 mprotect(a, page, PROT_NONE); in test_flush_page_write() 134 mprotect(a, page, PROT_READ|PROT_WRITE); in test_flush_page_write()
|