/linux/tools/testing/selftests/bpf/prog_tests/ |
A D | mmap.c | 61 tmp1 = mmap(NULL, page_size, PROT_READ, MAP_SHARED, rdmap_fd, 0); in test_mmap() 73 bss_mmaped = mmap(NULL, bss_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 81 map_mmaped = mmap(NULL, map_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 146 map_mmaped = mmap(NULL, map_sz, PROT_READ, MAP_SHARED, data_map_fd, 0); in test_mmap() 165 p = mmap(NULL, map_sz, flags, MAP_SHARED, data_map_fd, 0); in test_mmap() 180 tmp1 = mmap(NULL, map_sz, PROT_READ | PROT_WRITE, MAP_SHARED, in test_mmap() 206 tmp1 = mmap(tmp0, 3 * page_size, PROT_READ, MAP_SHARED | MAP_FIXED, in test_mmap() 222 MAP_SHARED | MAP_FIXED, data_map_fd, 0); in test_mmap() 232 tmp2 = mmap(tmp1, 4 * page_size, PROT_READ, MAP_SHARED | MAP_FIXED, in test_mmap() 253 tmp1 = mmap(NULL, 4 * page_size, PROT_READ, MAP_SHARED | MAP_FIXED, in test_mmap() [all …]
|
A D | ringbuf.c | 105 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, rb_fd, 0); in test_ringbuf() 114 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, page_size); in test_ringbuf() 120 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, 2 * page_size); in test_ringbuf() 124 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, 3 * page_size); in test_ringbuf() 126 mmap_ptr = mmap(NULL, 2 * page_size, PROT_WRITE, MAP_SHARED, rb_fd, 2 * page_size); in test_ringbuf() 130 mmap_ptr = mmap(NULL, 4 * page_size, PROT_READ, MAP_SHARED, rb_fd, 0); in test_ringbuf() 140 mmap_ptr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, rb_fd, page_size); in test_ringbuf()
|
/linux/tools/testing/selftests/arm64/mte/ |
A D | check_child_memory.c | 171 evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED), in main() 175 evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED), in main() 179 evaluate_test(check_child_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_SHARED), in main() 184 evaluate_test(check_child_file_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED), in main() 188 evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED), in main() 192 evaluate_test(check_child_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_SHARED), in main()
|
A D | check_mmap_options.c | 228 evaluate_test(check_anonymous_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 230 evaluate_test(check_anonymous_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 236 evaluate_test(check_anonymous_memory_mapping(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 238 …evaluate_test(check_anonymous_memory_mapping(USE_MPROTECT, MTE_ASYNC_ERR, MAP_SHARED, TAG_CHECK_ON… in main() 245 evaluate_test(check_file_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 247 evaluate_test(check_file_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 253 evaluate_test(check_file_memory_mapping(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main() 255 evaluate_test(check_file_memory_mapping(USE_MPROTECT, MTE_ASYNC_ERR, MAP_SHARED, TAG_CHECK_ON), in main()
|
A D | check_user_mem.c | 105 evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED), in main() 110 evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED), in main()
|
A D | check_ksm_options.c | 157 evaluate_test(check_madvise_options(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED), in main() 159 evaluate_test(check_madvise_options(USE_MMAP, MTE_ASYNC_ERR, MAP_SHARED), in main()
|
/linux/arch/sh/mm/ |
A D | mmap.c | 46 if ((flags & MAP_SHARED) && in arch_get_unmapped_area() 56 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area() 95 if ((flags & MAP_SHARED) && in arch_get_unmapped_area_topdown() 105 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area_topdown()
|
/linux/arch/arm/mm/ |
A D | mmap.c | 44 do_align = filp || (flags & MAP_SHARED); in arch_get_unmapped_area() 50 if (aliasing && flags & MAP_SHARED && in arch_get_unmapped_area() 97 do_align = filp || (flags & MAP_SHARED); in arch_get_unmapped_area_topdown() 104 if (aliasing && flags & MAP_SHARED && in arch_get_unmapped_area_topdown()
|
/linux/arch/xtensa/kernel/ |
A D | syscall.c | 66 if ((flags & MAP_SHARED) && in arch_get_unmapped_area() 77 if (flags & MAP_SHARED) in arch_get_unmapped_area() 89 if (flags & MAP_SHARED) in arch_get_unmapped_area()
|
/linux/tools/include/uapi/asm-generic/ |
A D | mman-common-tools.h | 18 #ifndef MAP_SHARED 19 #define MAP_SHARED 0x01 /* Share changes */ macro
|
/linux/tools/testing/selftests/vm/ |
A D | hugepage-mremap.c | 24 #define FLAGS (MAP_SHARED | MAP_ANONYMOUS) 116 MAP_HUGETLB | MAP_SHARED | MAP_POPULATE, fd, 0); in main() 126 MAP_HUGETLB | MAP_SHARED | MAP_POPULATE, fd, 0); in main()
|
A D | hugepage-mmap.c | 33 #define FLAGS (MAP_SHARED | MAP_FIXED) 36 #define FLAGS (MAP_SHARED)
|
A D | write_to_hugetlbfs.c | 172 (private ? MAP_PRIVATE : MAP_SHARED) | in main() 186 MAP_SHARED) | in main()
|
/linux/tools/io_uring/ |
A D | setup.c | 19 MAP_SHARED | MAP_POPULATE, fd, IORING_OFF_SQ_RING); in io_uring_mmap() 32 MAP_SHARED | MAP_POPULATE, fd, in io_uring_mmap() 43 MAP_SHARED | MAP_POPULATE, fd, IORING_OFF_CQ_RING); in io_uring_mmap()
|
/linux/tools/testing/selftests/memfd/ |
A D | memfd_test.c | 178 MAP_SHARED, in mfd_assert_mmap_shared() 283 MAP_SHARED, in mfd_assert_read_shared() 350 MAP_SHARED, in mfd_assert_write() 364 MAP_SHARED, in mfd_assert_write() 379 MAP_SHARED, in mfd_assert_write() 424 MAP_SHARED, in mfd_fail_write() 436 MAP_SHARED, in mfd_fail_write() 449 MAP_SHARED, in mfd_fail_write()
|
/linux/arch/csky/abiv1/ |
A D | mmap.c | 37 do_align = filp || (flags & MAP_SHARED); in arch_get_unmapped_area() 43 if (flags & MAP_SHARED && in arch_get_unmapped_area()
|
/linux/arch/nds32/mm/ |
A D | mmap.c | 39 do_align = filp || (flags & MAP_SHARED); in arch_get_unmapped_area() 45 if (aliasing && flags & MAP_SHARED && in arch_get_unmapped_area()
|
/linux/arch/arc/mm/ |
A D | mmap.c | 42 do_align = filp || (flags & MAP_SHARED); in arch_get_unmapped_area() 48 if (aliasing && flags & MAP_SHARED && in arch_get_unmapped_area()
|
/linux/arch/mips/mm/ |
A D | mmap.c | 51 if ((flags & MAP_SHARED) && in arch_get_unmapped_area_common() 58 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area_common()
|
/linux/tools/testing/selftests/mincore/ |
A D | mincore_selftest.c | 51 MAP_SHARED | MAP_ANONYMOUS, -1, 0); in TEST() 226 MAP_SHARED, fd, 0); in TEST() 323 MAP_SHARED, fd, 0); in TEST()
|
/linux/arch/parisc/kernel/ |
A D | sys_parisc.c | 115 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area() 120 if ((flags & MAP_SHARED) && last_mmap && in arch_get_unmapped_area() 171 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area_topdown() 176 if ((flags & MAP_SHARED) && last_mmap && in arch_get_unmapped_area_topdown()
|
/linux/arch/sparc/kernel/ |
A D | sys_sparc_64.c | 102 if ((flags & MAP_SHARED) && in arch_get_unmapped_area() 114 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area() 166 if ((flags & MAP_SHARED) && in arch_get_unmapped_area_topdown() 176 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area_topdown() 230 flags &= ~MAP_SHARED; in get_fb_unmapped_area()
|
A D | sys_sparc_32.c | 50 if ((flags & MAP_SHARED) && in arch_get_unmapped_area() 66 info.align_mask = (flags & MAP_SHARED) ? in arch_get_unmapped_area()
|
/linux/arch/s390/mm/ |
A D | mmap.c | 100 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area() 141 if (filp || (flags & MAP_SHARED)) in arch_get_unmapped_area_topdown()
|
/linux/tools/testing/selftests/dmabuf-heaps/ |
A D | dmabuf-heap.c | 166 MAP_SHARED, in test_alloc_and_import() 241 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed() 265 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed()
|