/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/kernel/mem/hugetlb/hugemmap/ |
D | hugemmap23.c | 35 {"R->RW", 1, PROT_READ, "PROT_READ", 36 1, PROT_READ|PROT_WRITE, "PROT_READ|PROT_WRITE"}, 38 {"RW->R", 1, PROT_READ|PROT_WRITE, "PROT_READ|PROT_WRITE", 39 1, PROT_READ, "PROT_READ"}, 41 {"R->RW 1/2", 2, PROT_READ, "PROT_READ", 42 1, PROT_READ|PROT_WRITE, "PROT_READ|PROT_WRITE"}, 44 {"RW->R 1/2", 2, PROT_READ|PROT_WRITE, "PROT_READ|PROT_WRITE", 45 1, PROT_READ, "PROT_READ"}, 48 1, PROT_READ, "PROT_READ"}, 51 1, PROT_READ|PROT_WRITE, "PROT_READ|PROT_WRITE"}, [all …]
|
D | hugemmap18.c | 46 p = mmap(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); in run_test() 61 q = mmap(p + page_size, hpage_size, PROT_READ|PROT_WRITE, in run_test() 75 q = mmap(p + page_size, hpage_size, PROT_READ|PROT_WRITE, in run_test() 83 q = mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); in run_test() 92 q = mmap(p, page_size, PROT_READ|PROT_WRITE, in run_test() 102 q = mmap(NULL, hpage_size, PROT_READ|PROT_WRITE, in run_test() 111 q = mmap(p, hpage_size, PROT_READ|PROT_WRITE, in run_test()
|
D | hugemmap24.c | 61 PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0); in init_slice_boundary() 96 PROT_READ | PROT_WRITE, in run_test() 105 PROT_READ | PROT_WRITE, in run_test() 134 PROT_READ|PROT_WRITE, in run_test() 143 q_size, PROT_READ | PROT_WRITE, in run_test()
|
D | hugemmap09.c | 34 p = SAFE_MMAP(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_SHARED, in run_test() 40 p = SAFE_MMAP(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, in run_test() 46 p = SAFE_MMAP(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_SHARED, in run_test()
|
D | hugemmap19.c | 60 p = SAFE_MMAP(NULL, 2*hpage_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); in run_test() 80 err = mprotect(p, hpage_size, PROT_READ); in run_test() 88 q = mmap(p + hpage_size, hpage_size, PROT_READ|PROT_WRITE, in run_test()
|
/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/syscalls/mmap/ |
D | mmap06.c | 34 {MMAPSIZE, PROT_READ, MAP_FILE | MAP_PRIVATE, EACCES}, 35 {MMAPSIZE, PROT_READ, MAP_FILE | MAP_SHARED, EACCES}, 36 {MMAPSIZE, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, EACCES}, 37 {MMAPSIZE, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, EACCES}, 38 {0, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, EINVAL}, 39 {MMAPSIZE, PROT_READ | PROT_WRITE, MAP_FILE, EINVAL}
|
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()
|
/third_party/musl/Benchmark/musl/ |
D | libc_mman.cpp | 131 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, -1, 0); in Bm_function_Mmap_anonymous() 148 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, -1, 0); in Bm_function_Munmap_anonymous() 167 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, fd, 0); in Bm_function_Mmap_fd() 189 char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, flags, fd, 0); in Bm_function_Munmap_fd() 204 …int *addr = (int*)mmap(nullptr, length, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in Bm_function_Madvise() 219 …void *oldAddr = mmap(nullptr, oldLength, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, … in Bm_function_Mremap() 245 …char* mem = (char *)mmap(nullptr, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1,… in Bm_function_Msync() 270 benchmark::DoNotOptimize(mprotect(pages, size, PROT_READ | PROT_WRITE)); in Bm_function_mprotect() 282 void *addr = mmap(nullptr, length, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in Bm_function_Mlock_Munlock()
|
/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/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/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 | 34 {PROT_READ, 0, "pass_mapped_buffer"}, 36 {PROT_EXEC | PROT_READ, 0, "pass_mapped_buffer"}, 37 {PROT_READ | PROT_WRITE, 1, "pass_unmapped_buffer"}
|
/third_party/ltp/testcases/kernel/syscalls/madvise/ |
D | madvise02.c | 140 file1 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 141 file2 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0); in setup() 142 file3 = SAFE_MMAP(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in setup() 143 shared_anon = SAFE_MMAP(0, MAP_SIZE, PROT_READ, MAP_SHARED | in setup()
|
/third_party/musl/libc-test/src/functionalext/supplement/mman/mman_gtest/ |
D | mman_mmap_test.cpp | 48 void* mapping = mmap(nullptr, SIZE, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); 64 void* mmapping = mmap(nullptr, 0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 79 …void* mmapping = mmap(nullptr, static_cast<size_t>(PTRDIFF_MAX) + 1, PROT_READ | PROT_WRITE, MAP_S… 116 void* mmapping = mmap(nullptr, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
/third_party/pcre2/pcre2/src/sljit/ |
D | sljitWXExecAllocator.c | 76 return mprotect(ptr, size, PROT_READ | PROT_WRITE); in generic_se_protected() 99 int prot = PROT_READ | PROT_WRITE | SLJIT_PROT_WX; in sljit_malloc_exec() 106 prot |= PROT_MAX(PROT_READ | PROT_WRITE | PROT_EXEC); in sljit_malloc_exec() 144 int prot = PROT_READ | (enable_exec ? PROT_EXEC : PROT_WRITE); in sljit_update_wx_flags()
|
/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/node/src/large_pages/ |
D | node_large_page.cc | 365 PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS); in MoveTextRegionToLargePages() 375 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 382 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 394 PROT_READ | PROT_WRITE | PROT_EXEC, in MoveTextRegionToLargePages() 399 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()
|
/third_party/ltp/testcases/kernel/syscalls/mlock/ |
D | mlock02.c | 40 addr = SAFE_MMAP(NULL, len, PROT_READ, in test_enomem1() 54 addr = SAFE_MMAP(NULL, len, PROT_READ, in test_enomem2() 71 addr = SAFE_MMAP(NULL, len, PROT_READ, in test_eperm()
|
/third_party/ltp/testcases/kernel/syscalls/mremap/ |
D | mremap06.c | 71 buf = SAFE_MMAP(0, mmap_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in do_test() 79 ret = mprotect(buf + (tc->incompatible-1)*page_size, page_size, PROT_READ); in do_test() 109 buf = SAFE_MMAP(0, mmap_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in setup()
|