/third_party/ltp/testcases/kernel/syscalls/pkeys/ |
D | pkey01.c | 72 {PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1}, 73 {PROT_READ, MAP_ANONYMOUS | MAP_SHARED, -1}, 74 {PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1}, 75 {PROT_READ, MAP_ANONYMOUS | MAP_SHARED | MAP_HUGETLB, -1}, 76 {PROT_READ, MAP_PRIVATE, 0}, 77 {PROT_READ, MAP_SHARED, 0}, 93 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1}, 94 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1}, 95 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1}, 96 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED | MAP_HUGETLB, -1}, [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/ |
D | 5-1.c | 44 {.flags = MAP_SHARED,.prot = PROT_READ}, 47 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE}, 48 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_EXEC}, 50 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE | PROT_EXEC}, 53 {.flags = MAP_PRIVATE,.prot = PROT_READ}, 56 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE}, 57 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_EXEC}, 59 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE | PROT_EXEC}, 69 if (t->prot & PROT_READ) in print_error()
|
D | 27-1.c | 60 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in main() 75 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main() 81 pa = mmap(pa, len / 2, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0); in main()
|
/third_party/ltp/testcases/kernel/mce-test/tsrc/ |
D | tsimpleinj.c | 90 page = mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, 0, 0); in main() 93 page = mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0); in main() 98 page = mmap(NULL, PS, PROT_READ, MAP_SHARED|MAP_POPULATE, fd, 0); in main() 110 page = mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in main() 122 page = mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in main() 142 page = mmap(NULL, PS*NPAGES, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in main()
|
D | tinjpage.c | 358 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, 0, 0); in dirty_anonymous() 365 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_POPULATE, 0, 0); in dirty_anonymous_unmap() 373 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0); in mlocked_anonymous() 386 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED|flags, in do_file_clean() 420 page = checked_mmap(NULL, PS, PROT_READ, in do_file_dirty() 429 page = checked_mmap(NULL, PS, PROT_READ, MAP_SHARED|MAP_POPULATE|flags, in do_file_dirty() 437 page = checked_mmap(NULL, PS, PROT_READ, MAP_SHARED|flags, fd, 0); in do_file_dirty() 472 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in file_hole() 496 page = checked_mmap(NULL, PS*NPAGES, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in nonlinear() 569 page = checked_mmap(NULL, PS, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, fd, 0); in under_io_dirty() [all …]
|
/third_party/musl/Benchmark/musl/ |
D | libc_mman.cpp | 100 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, -1, 0); in Bm_function_Mmap_anonymous() 117 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, -1, 0); in Bm_function_Munmap_anonymous() 137 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, fd, 0); in Bm_function_Mmap_fd() 160 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, fd, 0); in Bm_function_Munmap_fd() 175 …int *addr = (int*)mmap(nullptr, length, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in Bm_function_Madvise() 190 benchmark::DoNotOptimize(mprotect(pages, size, PROT_READ | PROT_WRITE)); in Bm_function_mprotect()
|
/third_party/musl/libc-test/src/functionalext/supplement/mman/ |
D | mmap.c | 52 start = mmap(NULL, statbuff.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in mmap_0100() 90 start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in mmap_0200() 113 start = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); in mmap_0300() 182 … start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_DENYWRITE, fd, 0); in mmap_0500() 255 start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, OFF_MASK); in mmap_0700() 288 start = mmap(NULL, PTRDIFF_MAX + 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in mmap_0800() 319 start = mmap(NULL, 0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in mmap_0900() 354 …start = mmap(NULL, statbuff.st_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, fd, getpagesiz… in mmap_1000() 391 …start = mmap((void *)(&get), statbuff.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_DENYWRITE… in mmap_1100()
|
D | mprotect.c | 32 int ret = mprotect(buffer, getpagesize(), PROT_READ); in mprotect_0100() 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/mmap/ |
D | mmap19.c | 40 mm1 = SAFE_MMAP(0, LEN, PROT_READ, MAP_PRIVATE, f1, 0); in run() 41 mm2 = SAFE_MMAP(0, LEN, PROT_READ, MAP_PRIVATE, f2, 0); in run() 55 mm1 = SAFE_MMAP(save_mm2, LEN, PROT_READ, MAP_PRIVATE, f1, 0); in run() 56 mm2 = SAFE_MMAP(save_mm1, LEN, PROT_READ, MAP_PRIVATE, f2, 0); in run()
|
D | mmap18.c | 92 start = SAFE_MMAP(NULL, reserved_size, PROT_READ | PROT_WRITE, in allocate_stack() 96 SAFE_MMAP((start + reserved_size - mapped_size), mapped_size, PROT_READ | PROT_WRITE, in allocate_stack() 186 SAFE_MMAP(stack, page_size, PROT_READ | PROT_WRITE, in grow_stack_fail()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/ |
D | Memory.inc | 48 return PROT_READ; 52 return PROT_READ | PROT_WRITE; 54 return PROT_READ | PROT_EXEC; 57 return PROT_READ | PROT_WRITE | PROT_EXEC; 66 return PROT_READ | PROT_EXEC; 110 Protect |= PROT_MPROTECT(PROT_READ | PROT_WRITE | PROT_EXEC); 190 // and CPU segfaults on trying to clear cache on !PROT_READ page. Therefore we need 191 // to temporarily add PROT_READ for the sake of flushing the instruction caches. 192 if (InvalidateCache && !(Protect & PROT_READ)) { 193 int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ);
|
/third_party/ltp/testcases/kernel/syscalls/sendfile/ |
D | sendfile04.c | 33 {PROT_READ, 0, "pass_mapped_buffer"}, 35 {PROT_EXEC | PROT_READ, 0, "pass_mapped_buffer"}, 36 {PROT_READ | PROT_WRITE, 1, "pass_unmapped_buffer"}
|
/third_party/ltp/testcases/kernel/syscalls/memfd_create/ |
D | memfd_create_common.c | 310 p = check_mmap(filename, lineno, NULL, MFD_DEF_SIZE, PROT_READ, in check_mfd_readable() 317 PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in check_mfd_readable() 333 PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in check_mfd_writeable() 349 PROT_READ, MAP_SHARED, fd, 0); in check_mfd_writeable() 352 PROT_READ | PROT_WRITE); in check_mfd_writeable() 383 PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in check_mfd_non_writeable() 392 p = mmap(NULL, MFD_DEF_SIZE, PROT_READ, MAP_SHARED, fd, 0); in check_mfd_non_writeable() 394 if (mprotect(p, MFD_DEF_SIZE, PROT_READ | PROT_WRITE) >= 0) { in check_mfd_non_writeable()
|
/third_party/elfutils/lib/ |
D | crc32_file.c | 53 void *mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0); in crc32_file() 59 && (mapped = mmap (NULL, mapsize, PROT_READ, MAP_PRIVATE, in crc32_file() 76 } while (mmap (mapped, mapsize, PROT_READ, MAP_FIXED|MAP_PRIVATE, in crc32_file()
|
/third_party/ltp/testcases/kernel/syscalls/madvise/ |
D | madvise02.c | 149 file1 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 150 file2 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 151 file3 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in setup() 152 shared_anon = SAFE_MMAP(0, MAP_SIZE, PROT_READ, MAP_SHARED | in setup()
|
/third_party/node/src/large_pages/ |
D | node_large_page.cc | 345 PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS); in MoveTextRegionToLargePages() 355 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 362 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 374 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 379 if (mprotect(start, size, PROT_READ | PROT_WRITE | PROT_EXEC) == -1) in MoveTextRegionToLargePages() 384 if (mprotect(start, size, PROT_READ | PROT_EXEC) == -1) goto fail; in MoveTextRegionToLargePages()
|
/third_party/pcre2/pcre2/src/sljit/ |
D | sljitWXExecAllocator.c | 99 return mprotect(ptr, size, PROT_READ | PROT_WRITE); in generic_se_protected() 124 int prot = PROT_READ | PROT_WRITE | SLJIT_PROT_WX; in sljit_malloc_exec() 131 prot |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC); in sljit_malloc_exec() 169 int prot = PROT_READ | (enable_exec ? PROT_EXEC : PROT_WRITE); in sljit_update_wx_flags()
|
/third_party/ltp/testcases/kernel/mem/hugetlb/hugemmap/ |
D | hugemmap02.c | 60 addr = mmap(0, 256 * 1024 * 1024, PROT_READ, in test_hugemmap() 72 addr = mmap((void *)low_addr, page_sz, PROT_READ, in test_hugemmap() 84 addr2 = mmap((void *)low_addr2, map_sz, PROT_READ | PROT_WRITE, in test_hugemmap()
|
/third_party/ltp/testcases/kernel/syscalls/mprotect/ |
D | mprotect01.c | 69 {NULL, 0, PROT_READ, ENOMEM, setup1}, 75 {NULL, 1024, PROT_READ, EINVAL, setup2}, 147 self->addr = mmap(0, self->len, PROT_READ, MAP_SHARED, fd, 0); in setup3()
|
/third_party/ltp/testcases/kernel/controllers/memcg/functional/ |
D | memcg_process.c | 120 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_anon() 147 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_file() 171 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_lock1() 187 p = mmap(NULL, memsize, PROT_WRITE | PROT_READ, in mmap_lock2()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/definitions/sys/mman_h/ |
D | 2-1-buildonly.c | 19 #ifndef PROT_READ 20 #error PROT_READ not defined
|
/third_party/ltp/testcases/kernel/syscalls/mlock/ |
D | mlock02.c | 119 addr = SAFE_MMAP(cleanup, NULL, len, PROT_READ, in test_enomem1() 143 addr = SAFE_MMAP(cleanup, NULL, len, PROT_READ, in test_enomem2() 172 addr = SAFE_MMAP(cleanup, NULL, len, PROT_READ, in test_eperm()
|
/third_party/ltp/testcases/kernel/mem/mmapstress/ |
D | mmapstress03.c | 146 PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_FIXED | MAP_SHARED, in main() 168 PROT_READ | PROT_WRITE, in do_test() 176 PROT_READ | PROT_WRITE, in do_test()
|
D | mmapstress05.c | 179 if (mmap(mmapaddr + pagesize, pagesize, PROT_READ, in main() 186 if (mmap(mmapaddr, pagesize, PROT_READ, in main() 193 if (mmap(mmapaddr + 2 * pagesize, pagesize, PROT_READ, in main()
|
/third_party/rust/crates/nix/test/sys/ |
D | test_mman.rs | 10 ProtFlags::PROT_READ | ProtFlags::PROT_WRITE, in test_mmap_anonymous() 35 ProtFlags::PROT_READ | ProtFlags::PROT_WRITE, in test_mremap_grow() 93 ProtFlags::PROT_READ | ProtFlags::PROT_WRITE, in test_mremap_shrink()
|