Home
last modified time | relevance | path

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

1234

/third_party/musl/libc-test/src/functionalext/supplement/mman/
H A Dmprotect.c32 int ret = mprotect(buffer, getpagesize(), PROT_READ); in mprotect_0100()
45 int ret = mprotect(buffer, getpagesize(), PROT_WRITE); in mprotect_0200()
58 int ret = mprotect(buffer, getpagesize(), PROT_EXEC); in mprotect_0300()
71 int ret = mprotect(buffer, getpagesize(), PROT_NONE); in mprotect_0400()
84 int ret = mprotect(buffer, getpagesize(), PROT_READ | PROT_WRITE); in mprotect_0500()
96 int ret = mprotect((void *)0x0001, getpagesize(), PROT_READ); in mprotect_0600()
/third_party/ltp/testcases/kernel/syscalls/mprotect/
H A Dmprotect05.c10 * Testcase to check the mprotect(2) system call split and merge.
36 if (mprotect(addr + pagesize, pagesize, PROT_EXEC)) in run()
37 tst_res(TFAIL | TERRNO, "mprotect failed to exec"); in run()
39 if (mprotect(addr + 3 * pagesize, pagesize, PROT_WRITE)) in run()
40 tst_res(TFAIL | TERRNO, "mprotect failed to write"); in run()
42 if (mprotect(addr + pagesize, pagesize * 4, PROT_READ)) in run()
43 tst_res(TFAIL | TERRNO, "mprotect failed to read"); in run()
H A Dmprotect04.c20 * 1) mprotect() succeeds to set a region of memory with no access,
23 * 2) mprotect() succeeds to set a region of memory to be executed, when
106 TEST(mprotect(addr, page_sz, PROT_NONE)); in testfunc_protnone()
109 tst_resm(TFAIL | TTERRNO, "mprotect failed"); in testfunc_protnone()
116 tst_resm(TPASS, "test PROT_NONE for mprotect success"); in testfunc_protnone()
119 tst_resm(TFAIL, "test PROT_NONE for mprotect failed"); in testfunc_protnone()
208 TEST(mprotect(page_to_copy, page_sz, PROT_READ | PROT_EXEC)); in get_func()
211 "mprotect(PROT_READ|PROT_EXEC) failed"); in get_func()
256 TEST(mprotect(p, page_sz, PROT_EXEC)); in testfunc_protexec()
259 tst_resm(TFAIL | TTERRNO, "mprotect faile in testfunc_protexec()
[all...]
H A Dmprotect03.c24 * Testcase to check the mprotect(2) system call.
28 * using the mmap(2) call. Then, use mprotect(2) to disable the
95 TEST(mprotect(addr, strlen(buf), PROT_READ)); in main()
118 tst_resm(TFAIL, "mprotect failed " in main()
/third_party/musl/libc-test/src/functionalext/supplement/mman/mman_gtest/
H A Dmman_mprotect_test.cpp25 int protectResult = mprotect(memoryBuffer, pageSize, PROT_WRITE); in HWTEST_F()
29 protectResult = mprotect(memoryBuffer, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC); in HWTEST_F()
/third_party/pcre2/pcre2/src/sljit/
H A DsljitWXExecAllocator.c75 if (SLJIT_LIKELY(!mprotect(ptr, size, PROT_EXEC))) in generic_se_protected()
76 return mprotect(ptr, size, PROT_READ | PROT_WRITE); in generic_se_protected()
151 mprotect((void*)start, end - start, prot); in sljit_update_wx_flags()
/third_party/libunwind/libunwind/tests/
H A DLtest-mem-validate.c55 mprotect((void*)((uintptr_t)stack_start & ~(PAGE_SIZE - 1)), in do_backtrace()
90 mprotect((void*)((uintptr_t)stack_start & ~(PAGE_SIZE - 1)), in do_backtrace()
119 the mprotect call so we are not forbidding access to in main()
/third_party/rust/crates/rustix/tests/mm/
H A Dmmap.rs78 use rustix::mm::{mmap_anonymous, mprotect, munmap, MapFlags, MprotectFlags, ProtFlags}; in test_mprotect()
85 mprotect(addr, 8192, MprotectFlags::empty()).unwrap(); in test_mprotect()
86 mprotect(addr, 8192, MprotectFlags::READ).unwrap(); in test_mprotect()
/third_party/node/test/cctest/
H A Dtest_crypto_clienthello.cc15 // mprotect() or VirtualProtect() to cause a segmentation fault when spatial
60 CHECK_EQ(mprotect(second_page, page, PROT_NONE), 0); in OverrunGuardedBuffer()
95 CHECK_EQ(mprotect(second_page, page, PROT_READ | PROT_WRITE), 0); in ~OverrunGuardedBuffer()
/third_party/ltp/testcases/kernel/syscalls/signal/
H A Dsignal06.c102 TEST(mprotect(altstack, sizeof(altstack), PROT_READ)); in tfunc()
104 tst_brkm(TBROK | TTERRNO, NULL, "mprotect failed"); in tfunc()
107 TEST(mprotect(altstack, sizeof(altstack), PROT_READ | PROT_WRITE)); in tfunc()
109 tst_brkm(TBROK | TTERRNO, NULL, "mprotect failed"); in tfunc()
/third_party/rust/crates/rustix/src/mm/
H A Dmmap.rs142 /// `mprotect(ptr, len, flags)`
152 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mprotect.html
153 /// [Linux]: https://man7.org/linux/man-pages/man2/mprotect.2.html
155 pub unsafe fn mprotect(ptr: *mut c_void, len: usize, flags: MprotectFlags) -> io::Result<()> { in mprotect() functions
156 backend::mm::syscalls::mprotect(ptr, len, flags) in mprotect()
H A Dmod.rs13 mlock, mmap, mmap_anonymous, mprotect, munlock, munmap, MapFlags, MprotectFlags, ProtFlags,
/third_party/vixl/src/
H A Dcode-buffer-vixl.cc98 int ret = mprotect(buffer_, capacity_, PROT_READ | PROT_EXEC); in SetExecutable()
110 int ret = mprotect(buffer_, capacity_, PROT_READ | PROT_WRITE); in SetWritable()
/third_party/ltp/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/
H A D14-1-buildonly.c11 * int mprotect(void *, size_t, int)
24 dummyvar = mprotect; in dummyfcn()
/third_party/musl/src/mman/
H A Dmprotect.c13 weak_alias(__mprotect, mprotect);
/third_party/ltp/testcases/kernel/syscalls/madvise/
H A Dmadvise05.c31 TEST(mprotect(p, ALLOC_SIZE, PROT_NONE)); in verify_madvise()
33 tst_brk(TBROK | TTERRNO, "mprotect failed"); in verify_madvise()
/third_party/ltp/tools/sparse/sparse-src/compat/
H A Dmmap-blob.c35 mprotect(addr, size, PROT_NONE); in blob_free()
/third_party/mesa3d/src/panfrost/lib/genxml/
H A Ddecode_common.c93 mprotect(mem->addr, mem->length, PROT_READ); in pandecode_find_mapped_gpu_mem_containing()
108 mprotect((*mem)->addr, (*mem)->length, PROT_READ | PROT_WRITE); in pandecode_map_read_write()
/third_party/ltp/testcases/kernel/mem/thp/
H A Dthp03.c56 if (mprotect(p, unaligned_size, PROT_NONE) == -1) in thp_test()
57 tst_brk(TBROK | TERRNO, "mprotect"); in thp_test()
/third_party/ltp/testcases/kernel/syscalls/
H A DMakefile15 mincore mprotect nftw profil remap_file_pages sbrk
/third_party/ltp/testcases/kernel/syscalls/brk/
H A Dbrk02.c10 * and not expanding the original due to multiple anon pages. mprotect() that
70 if (mprotect(addr - page_size, page_size, PROT_READ)) { in brk_down_vmas()
71 tst_res(TFAIL | TERRNO, "Cannot mprotect new VMA"); in brk_down_vmas()
77 tst_res(TFAIL | TERRNO, "Cannot expand brk() after mprotect"); in brk_down_vmas()
/third_party/vixl/examples/aarch64/
H A Dexecutable-memory.h60 int res = mprotect(buffer_, size_, PROT_READ | PROT_EXEC); in ExecutableMemory()
/third_party/ltp/testcases/kernel/mem/hugetlb/hugemmap/
H A Dhugemmap19.c80 err = mprotect(p, hpage_size, PROT_READ); in run_test()
82 tst_brk(TBROK|TERRNO, "mprotect(%p, 0x%lx, PROT_READ)", p, hpage_size); in run_test()
112 * mprotect()s to flush the TLB are supposed to catch it, but in run_test()
/third_party/musl/libc-test/src/api/
H A Dsys_mman.c49 {int(*p)(void*,size_t,int) = mprotect;} in f()
/third_party/node/src/large_pages/
H A Dnode_large_page.cc399 if (mprotect(start, size, PROT_READ | PROT_WRITE | PROT_EXEC) == -1) in MoveTextRegionToLargePages()
404 if (mprotect(start, size, PROT_READ | PROT_EXEC) == -1) goto fail; in MoveTextRegionToLargePages()

Completed in 9 milliseconds

1234