Home
last modified time | relevance | path

Searched refs:PROT_READ (Results 1 – 25 of 526) sorted by relevance

12345678910>>...22

/third_party/ltp/testcases/kernel/syscalls/pkeys/
Dpkey01.c72 {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/
D5-1.c44 {.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()
D27-1.c60 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/
Dtsimpleinj.c90 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()
Dtinjpage.c358 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/
Dlibc_mman.cpp100 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/
Dmmap.c52 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()
Dmprotect.c32 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/
Dmmap19.c40 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()
Dmmap18.c92 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/
DMemory.inc48 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/
Dsendfile04.c33 {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/
Dmemfd_create_common.c310 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/
Dcrc32_file.c53 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/
Dmadvise02.c149 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/
Dnode_large_page.cc345 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/
DsljitWXExecAllocator.c99 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/
Dhugemmap02.c60 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/
Dmprotect01.c69 {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/
Dmemcg_process.c120 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/
D2-1-buildonly.c19 #ifndef PROT_READ
20 #error PROT_READ not defined
/third_party/ltp/testcases/kernel/syscalls/mlock/
Dmlock02.c119 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/
Dmmapstress03.c146 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()
Dmmapstress05.c179 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/
Dtest_mman.rs10 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()

12345678910>>...22