/kernel/liteos_a/testsuites/unittest/basic/mem/vm/smoke/ |
D | mmap_test_002.cpp | 86 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_ANONYMOUS, -1); in Testcase() 90 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_SHARED, shmfd); in Testcase() 94 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_PRIVATE, shmfd); in Testcase() 98 ret = CheckedMmap(PROT_READ | PROT_WRITE | 0x100000, MAP_ANONYMOUS, -1); in Testcase() 106 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_RESERVED0080, -1); in Testcase() 110 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_SHARED, -1); in Testcase() 114 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_SHARED, shmfd); in Testcase() 118 ret = CheckedMmap(PROT_READ | PROT_WRITE, 0, shmfd); in Testcase() 122 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1); in Testcase() 125 ret = CheckedMmap(PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1); in Testcase() [all …]
|
D | mprotect_test_001.cpp | 49 ret = mprotect((void *)0x1000, pageSize, PROT_READ | PROT_WRITE); in Testcase() 53 ret = mprotect((void *)0xffffff, pageSize, PROT_READ | PROT_WRITE); in Testcase() 57 p = (char *)mmap(NULL, pageSize * 3, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in Testcase() 60 ret = mprotect(p, pageSize * 4, PROT_READ | PROT_WRITE); in Testcase() 64 ret = mprotect(p, pageSize, PROT_READ | PROT_WRITE); in Testcase() 68 ret = mprotect(p + pageSize * 2, pageSize, PROT_READ | PROT_WRITE); in Testcase()
|
D | mmap_test_008.cpp | 50 mem = mmap((void *)fixAddr, len, PROT_READ | PROT_WRITE, flags | MAP_FIXED, -1, 0); in Testcase() 53 memFix = mmap((void *)fixAddr, len, PROT_READ | PROT_WRITE, flags | MAP_FIXED, -1, 0); in Testcase() 57 … memNoFix = mmap((void *)fixAddr, len, PROT_READ | PROT_WRITE, flags | MAP_FIXED_NOREPLACE, -1, 0); in Testcase() 60 …memNoFix = mmap((void *)(fixAddr - MAP_OFFSET), len, PROT_READ | PROT_WRITE, flags | MAP_FIXED_NOR… in Testcase() 63 …memNoFix = mmap((void *)(fixAddr + MAP_OFFSET), len, PROT_READ | PROT_WRITE, flags | MAP_FIXED_NOR… in Testcase() 66 memNoFix = mmap((void *)(fixAddr - MAP_OFFSET), len + MAP_OFFSET, PROT_READ | PROT_WRITE, in Testcase()
|
D | mmap_test_006.cpp | 53 mem = mmap(invalueAddr, len, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, 0); in Testcase() 57 mem = mmap((void *)INVALID_VADDR, len, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, 0); in Testcase() 61 mem = mmap((void *)INVALID_VADDR, len, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); in Testcase() 67 mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Testcase() 72 mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, INVALID_FD); in Testcase() 77 mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Testcase() 83 mem = mmap(NULL, len, PROT_READ | PROT_WRITE, flags[i], fd, 0); in Testcase()
|
D | mmap_test_007.cpp | 50 mem = mmap((void *)fixAddr, len, PROT_READ | PROT_WRITE, flags, -1, 0); in Testcase() 54 prev = mmap((void *)before, len, PROT_READ | PROT_WRITE, flags, -1, 0); in Testcase() 58 next = mmap((void *)after, len, PROT_READ | PROT_WRITE, flags, -1, 0); in Testcase() 62 belong = mmap((void *)after, shinkLen, PROT_READ | PROT_WRITE, flags, -1, 0); in Testcase()
|
D | mmap_test_003.cpp | 47 p1 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in Testcase() 51 p2 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in Testcase() 64 p3 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in Testcase()
|
D | mmap_test_004.cpp | 47 p1 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Testcase() 51 p2 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Testcase() 64 p3 = (char *)mmap(NULL, pageSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in Testcase()
|
D | mmap_test_009.cpp | 65 ptr = (int *)mmap(0, MMAP_SIZE, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); in Testcase() 68 ret = mprotect(ptr, MMAP_SIZE, PROT_READ); in Testcase()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | mmap.c | 41 tmp1 = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, rdmap_fd, 0); in test_mmap() 47 tmp1 = mmap(NULL, 4096, PROT_READ, MAP_SHARED, rdmap_fd, 0); in test_mmap() 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() 121 err = mprotect(map_mmaped, map_sz, PROT_READ); in test_mmap() 132 map_mmaped = mmap(NULL, map_sz, PROT_READ, MAP_SHARED, data_map_fd, 0); in test_mmap() 148 int flags = i % 2 ? PROT_READ : PROT_WRITE; in test_mmap() 166 tmp1 = mmap(NULL, map_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 186 tmp0 = mmap(NULL, 4 * page_size, PROT_READ, MAP_SHARED | MAP_ANONYMOUS, in test_mmap() 192 tmp1 = mmap(tmp0, 3 * page_size, PROT_READ, MAP_SHARED | MAP_FIXED, in test_mmap() [all …]
|
/kernel/liteos_a/testsuites/unittest/extended/liteipc/smoke/ |
D | liteipc_test_001.cpp | 64 retptr = mmap(nullptr, 1024 * 4096, PROT_READ, MAP_PRIVATE, fd, 0); in LiteIpcTest() 66 retptr = mmap(nullptr, -1, PROT_READ, MAP_PRIVATE, fd, 0); in LiteIpcTest() 68 retptr = mmap(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in LiteIpcTest() 70 retptr = mmap(nullptr, 4096, PROT_READ, MAP_SHARED, fd, 0); // 4096: length of mapped memory in LiteIpcTest() 73 retptr = mmap(nullptr, 1, PROT_READ, MAP_PRIVATE, fd, 0); in LiteIpcTest() 75 retptr = mmap(nullptr, 4095, PROT_READ, MAP_PRIVATE, fd, 0); in LiteIpcTest() 121 retptr = mmap(nullptr, 16 * 4096, PROT_READ, MAP_PRIVATE, fd, 0); in TestCase()
|
/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
D | mremap_dontunmap.c | 103 mmap(NULL, num_pages * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_simple() 140 mmap(NULL, num_pages * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_simple_fixed() 146 mmap(NULL, num_pages * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_simple_fixed() 196 mmap(NULL, num_pages * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_partial_mapping() 248 mmap(NULL, 5 * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_partial_mapping_overwrite() 254 mmap(NULL, 10 * page_size, PROT_READ | PROT_WRITE, in mremap_dontunmap_partial_mapping_overwrite() 298 mmap(NULL, page_size, PROT_READ | PROT_WRITE, in main()
|
D | hmm-tests.c | 243 PROT_READ | PROT_WRITE, in TEST_F() 257 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F() 306 PROT_READ | PROT_WRITE, in TEST_F() 328 ret = mprotect(buffer->ptr, size, PROT_READ); in TEST_F() 365 PROT_READ | PROT_WRITE, in TEST_F() 413 PROT_READ, in TEST_F() 437 ret = mprotect(buffer->ptr, size, PROT_WRITE | PROT_READ); in TEST_F() 481 PROT_READ | PROT_WRITE, in TEST_F() 559 PROT_READ | PROT_WRITE, in TEST_F() 634 PROT_READ | PROT_WRITE, in TEST_F() [all …]
|
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()
|
D | mlock2-tests.c | 197 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_lock() 260 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_mlock_onfault() 302 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_lock_onfault_of_present() 338 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_munlockall() 364 map = mmap(NULL, 2 * page_size, PROT_READ | PROT_WRITE, in test_munlockall() 419 map = mmap(NULL, 3 * page_size, PROT_READ | PROT_WRITE, in test_vma_management()
|
/kernel/linux/linux-5.10/tools/testing/selftests/memfd/ |
D | memfd_test.c | 177 PROT_READ | PROT_WRITE, in mfd_assert_mmap_shared() 195 PROT_READ, in mfd_assert_mmap_private() 250 PROT_READ, in mfd_assert_read() 263 PROT_READ | PROT_WRITE, in mfd_assert_read() 282 PROT_READ, in mfd_assert_read_shared() 300 PROT_READ | PROT_WRITE, in mfd_assert_fork_private_write() 349 PROT_READ | PROT_WRITE, in mfd_assert_write() 378 PROT_READ, in mfd_assert_write() 387 r = mprotect(p, mfd_def_size, PROT_READ | PROT_WRITE); in mfd_assert_write() 423 PROT_READ | PROT_WRITE, in mfd_fail_write() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/mm/ |
D | hugetlb_vs_thp_test.c | 18 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body() 34 p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, in test_body()
|
/kernel/linux/linux-5.10/tools/testing/selftests/mincore/ |
D | mincore_selftest.c | 51 addr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, in TEST() 95 addr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, in TEST() 150 addr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, in TEST() 232 addr = mmap(NULL, FILE_SIZE, PROT_READ | PROT_WRITE, in TEST() 331 addr = mmap(NULL, FILE_SIZE, PROT_READ | PROT_WRITE, in TEST()
|
/kernel/linux/linux-5.10/drivers/misc/lkdtm/ |
D | usercopy.c | 81 PROT_READ | PROT_WRITE | PROT_EXEC, in do_usercopy_stack() 149 PROT_READ | PROT_WRITE | PROT_EXEC, in do_usercopy_heap_size() 223 PROT_READ | PROT_WRITE | PROT_EXEC, in do_usercopy_heap_whitelist() 311 PROT_READ | PROT_WRITE | PROT_EXEC, in lkdtm_USERCOPY_KERNEL()
|
/kernel/linux/linux-5.10/tools/io_uring/ |
D | setup.c | 18 ptr = mmap(0, sq->ring_sz, PROT_READ | PROT_WRITE, in io_uring_mmap() 31 sq->sqes = mmap(0, size, PROT_READ | PROT_WRITE, in io_uring_mmap() 42 ptr = mmap(0, cq->ring_sz, PROT_READ | PROT_WRITE, in io_uring_mmap()
|
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
D | It_container_chroot_002.cpp | 58 char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, in TestFunc() 104 char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, in ItContainerChroot002()
|
D | It_net_container_004.cpp | 55 …char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, CLONE_STACK_MMAP_FLAG, -1,… in ChildFun() 109 …char *stack = (char *)mmap(nullptr, STACK_SIZE, PROT_READ | PROT_WRITE, CLONE_STACK_MMAP_FLAG, -1,… in ItNetContainer004()
|
/kernel/linux/linux-5.10/arch/x86/um/os-Linux/ |
D | task_size.c | 36 PROT_READ | PROT_WRITE, in page_ok() 54 PROT_READ | PROT_WRITE) != 0) in page_ok()
|
/kernel/linux/linux-5.10/include/linux/ |
D | mman.h | 106 return (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM)) == 0; in arch_validate_prot() 141 return _calc_vm_trans(prot, PROT_READ, VM_READ ) | in calc_vm_prot_bits()
|
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/tm/ |
D | tm-signal-context-force-tm.c | 61 PROT_READ | PROT_WRITE, in usr_signal_handler() 127 ss.ss_sp = mmap(NULL, SIGSTKSZ, PROT_READ | PROT_WRITE, in tm_trap_test()
|
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/primitives/ |
D | load_unaligned_zeropad.c | 53 if (mprotect(mem_region + page_size, page_size, PROT_READ|PROT_WRITE)) { in unprotect_region() 126 mem_region = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE, in test_body()
|