/external/ltp/testcases/kernel/syscalls/pkeys/ |
D | pkey01.c | 87 {PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1}, 88 {PROT_READ, MAP_ANONYMOUS | MAP_SHARED, -1}, 89 {PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1}, 90 {PROT_READ, MAP_ANONYMOUS | MAP_SHARED | MAP_HUGETLB, -1}, 91 {PROT_READ, MAP_PRIVATE, 0}, 92 {PROT_READ, MAP_SHARED, 0}, 108 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1}, 109 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1}, 110 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_HUGETLB, -1}, 111 {PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED | MAP_HUGETLB, -1}, [all …]
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/ |
D | 5-1.c | 42 {.flags = MAP_SHARED,.prot = PROT_READ}, 45 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE}, 46 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_EXEC}, 48 {.flags = MAP_SHARED,.prot = PROT_READ | PROT_WRITE | PROT_EXEC}, 51 {.flags = MAP_PRIVATE,.prot = PROT_READ}, 54 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE}, 55 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_EXEC}, 57 {.flags = MAP_PRIVATE,.prot = PROT_READ | PROT_WRITE | PROT_EXEC}, 67 if (t->prot & PROT_READ) in print_error()
|
D | 27-1.c | 58 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in main() 73 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main() 79 pa = mmap(pa, len / 2, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0); in main()
|
/external/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/ |
D | mmap_write_exec.cpp | 14 char *p = (char *)mmap(0, 1024, PROT_READ | PROT_WRITE | PROT_EXEC, in main() 20 char *q = (char *)mmap(p, 64, PROT_READ | PROT_WRITE, in main() 27 char *a = (char *)mmap(0, 1024, PROT_READ | PROT_WRITE, in main() 29 char *b = (char *)mmap(a, 64, PROT_READ | PROT_WRITE, in main() 31 (void)mprotect(q, 64, PROT_READ | PROT_EXEC); in main()
|
/external/strace/tests/ |
D | old_mmap.c | 65 PROT_READ|PROT_EXEC, /* prot */ in main() 74 PROT_READ|PROT_WRITE, in main() 84 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 90 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 104 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main() 110 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main()
|
/external/strace/tests-m32/ |
D | old_mmap.c | 65 PROT_READ|PROT_EXEC, /* prot */ in main() 74 PROT_READ|PROT_WRITE, in main() 84 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 90 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 104 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main() 110 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main()
|
/external/strace/tests-mx32/ |
D | old_mmap.c | 65 PROT_READ|PROT_EXEC, /* prot */ in main() 74 PROT_READ|PROT_WRITE, in main() 84 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 90 args1_c[0], args1_c[1], PROT_READ|PROT_EXEC, MAP_FILE, MAP_FIXED, in main() 104 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main() 110 args2_c[1], PROT_READ|PROT_WRITE, MAP_PRIVATE, MAP_ANONYMOUS, in main()
|
/external/llvm-project/clang/test/Analysis/ |
D | mmap-writeexec.c | 7 #define PROT_READ 0x01 macro 10 #define PROT_READ 0x04 macro 23 void *a = mmap(NULL, 16, PROT_READ | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0); // no-warning in f1() 24 …void *b = mmap(a, 16, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_ANON, -1, 0); // no-wa… in f1() 25 …void *c = mmap(NULL, 32, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0); // ex… in f1()
|
/external/igt-gpu-tools/tests/ |
D | prime_mmap.c | 89 ptr1 = gem_mmap__gtt(fd, handle, BO_SIZE, PROT_READ); in test_correct() 90 ptr2 = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_correct() 117 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_map_unmap() 123 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_map_unmap() 146 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_reprime() 155 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_reprime() 179 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_forked() 206 ptr = mmap(NULL, BO_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, dma_buf_fd, 0); in test_correct_cpu_write() 236 ptr = mmap(NULL, BO_SIZE, PROT_READ | PROT_WRITE , MAP_SHARED, dma_buf_fd, 0); in test_forked_cpu_write() 264 ptr = mmap(NULL, BO_SIZE, PROT_READ, MAP_SHARED, dma_buf_fd, 0); in test_refcounting() [all …]
|
D | prime_mmap_coherency.c | 72 ptr_gtt = gem_mmap__gtt(fd, bo_2->handle, width * height, PROT_READ | PROT_WRITE); in test_read_flush() 78 ptr_cpu = mmap(NULL, width * height, PROT_READ, in test_read_flush() 138 ptr_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, in test_write_flush() 158 ptr2_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, in test_write_flush() 203 ptr_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, in blit_and_cmp() 210 ptr2_cpu = mmap(NULL, width * height, PROT_READ | PROT_WRITE, in blit_and_cmp()
|
/external/igt-gpu-tools/tests/i915/ |
D | gem_gtt_speed.c | 145 uint32_t *base = gem_mmap__cpu(fd, handle, 0, size, PROT_READ | PROT_WRITE); 162 PROT_READ | PROT_WRITE); 180 PROT_READ | PROT_WRITE); 204 PROT_READ | PROT_WRITE); 220 PROT_READ | PROT_WRITE); 230 PROT_READ | PROT_WRITE); 258 uint32_t *base = gem_mmap__gtt(fd, handle, size, PROT_READ | PROT_WRITE); 273 uint32_t *base = gem_mmap__gtt(fd, handle, size, PROT_READ | PROT_WRITE); 292 uint32_t *base = gem_mmap__wc(fd, handle, 0, size, PROT_READ | PROT_WRITE); 309 uint32_t *base = gem_mmap__wc(fd, handle, 0, size, PROT_READ | PROT_WRITE); [all …]
|
D | gem_mmap_gtt.c | 63 ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); in mmap_bo() 99 igt_assert(mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE, in test_access() 103 igt_assert(mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE, in test_access() 114 igt_assert(mmap64(0, OBJECT_SIZE, PROT_READ | PROT_WRITE, in test_access() 131 w = mmap64(0, pages * PAGE_SIZE, PROT_READ | PROT_WRITE, in test_short() 135 r = mmap64(0, pages * PAGE_SIZE, PROT_READ, in test_short() 181 ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); in test_read_write() 205 r = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ); in test_read_write2() 206 w = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); in test_read_write2() 247 cpu = gem_mmap__cpu(fd, handle, 0, 4096, PROT_READ | PROT_WRITE); in test_wc() [all …]
|
/external/crosvm/seccomp/x86_64/ |
D | video_device.policy | 32 mmap: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ|PROT_EXEC || arg2 == P… 33 mprotect: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ
|
D | gpu_device.policy | 69 mmap: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ|PROT_EXEC || arg2 == P… 70 mprotect: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ
|
/external/crosvm/seccomp/aarch64/ |
D | gpu_device.policy | 66 mmap: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ|PROT_EXEC || arg2 == P… 67 mprotect: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ
|
/external/linux-kselftest/tools/testing/selftests/bpf/prog_tests/ |
D | mmap.c | 59 bss_mmaped = mmap(NULL, bss_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 67 map_mmaped = mmap(NULL, map_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 124 map_mmaped = mmap(NULL, map_sz, PROT_READ, MAP_SHARED, data_map_fd, 0); in test_mmap() 134 int flags = i % 2 ? PROT_READ : PROT_WRITE; in test_mmap() 152 tmp1 = mmap(NULL, map_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 171 tmp1 = mmap(NULL, 3 * page_size, PROT_READ, MAP_SHARED, in test_mmap() 184 tmp2 = mmap(tmp1 + page_size, page_size, PROT_READ, in test_mmap() 195 tmp2 = mmap(tmp1, 4 * page_size, PROT_READ, MAP_SHARED | MAP_FIXED, in test_mmap()
|
/external/crosvm/seccomp/arm/ |
D | gpu_device.policy | 75 mmap2: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ|PROT_EXEC || arg2 == … 76 mprotect: arg2 == PROT_READ|PROT_WRITE || arg2 == PROT_NONE || arg2 == PROT_READ
|
/external/llvm-project/compiler-rt/test/builtins/Unit/ |
D | clear_cache_test.c | 54 PROT_MPROTECT(PROT_READ | PROT_WRITE | in main() 64 if (mprotect(write_buffer, kSize, PROT_READ | PROT_WRITE) == -1) in main() 66 if (mprotect(execution_buffer, kSize, PROT_READ | PROT_EXEC) == -1) in main() 70 PROT_READ | PROT_WRITE | PROT_EXEC, in main()
|
/external/ltp/testcases/kernel/syscalls/memmap/ |
D | mem03.c | 92 mm1 = mmap(0, 64, PROT_READ, MAP_PRIVATE, f1, 0); in main() 93 mm2 = mmap(0, 64, PROT_READ, MAP_PRIVATE, f2, 0); in main() 110 mm1 = mmap(save_mm2, 64, PROT_READ, MAP_PRIVATE, f1, 0); in main() 111 mm2 = mmap(save_mm1, 64, PROT_READ, MAP_PRIVATE, f2, 0); in main()
|
/external/autotest/client/tests/memory_api/ |
D | memory_api.c | 64 mem = mmap(0, memsize, PROT_READ | PROT_WRITE, in main() 78 if (-1 == mprotect(mem, HALF_MEM(memsize), PROT_READ)) { in main() 89 PROT_READ | PROT_WRITE)) { in main() 136 mem = mmap(0, memsize, PROT_READ | PROT_WRITE, in main()
|
/external/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);
|
/external/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()
|
/external/pdfium/third_party/base/allocator/partition_allocator/ |
D | page_allocator_internals_posix.h | 67 return PROT_READ; in GetAccessFlags() 69 return PROT_READ | PROT_WRITE; in GetAccessFlags() 71 return PROT_READ | PROT_EXEC; in GetAccessFlags() 73 return PROT_READ | PROT_WRITE | PROT_EXEC; in GetAccessFlags()
|
/external/llvm-project/llvm/lib/Support/Unix/ |
D | Memory.inc | 49 return PROT_READ; 53 return PROT_READ | PROT_WRITE; 55 return PROT_READ | PROT_EXEC; 58 return PROT_READ | PROT_WRITE | PROT_EXEC; 67 return PROT_READ | PROT_EXEC; 111 Protect |= PROT_MPROTECT(PROT_READ | PROT_WRITE | PROT_EXEC); 191 // and CPU segfaults on trying to clear cache on !PROT_READ page. Therefore we need 192 // to temporarily add PROT_READ for the sake of flushing the instruction caches. 193 if (InvalidateCache && !(Protect & PROT_READ)) { 194 int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ);
|
/external/linux-kselftest/tools/testing/selftests/vm/ |
D | virtual_address_range.c | 88 ptr = mmap((void *) (1UL << 45), MAP_CHUNK_SIZE, PROT_READ | in validate_lower_address_hint() 105 ptr[i] = mmap(NULL, MAP_CHUNK_SIZE, PROT_READ | PROT_WRITE, in main() 121 hptr[i] = mmap(hint, MAP_CHUNK_SIZE, PROT_READ | PROT_WRITE, in main()
|