Searched refs:mem_fd (Results 1 – 4 of 4) sorted by relevance
/tools/testing/selftests/mm/ |
D | mkdirty.c | 30 static int mem_fd; variable 110 lseek(mem_fd, (uintptr_t) mem, SEEK_SET); in test_ptrace_write() 111 ret = write(mem_fd, &data, 1); in test_ptrace_write() 140 lseek(mem_fd, (uintptr_t) mem, SEEK_SET); in test_ptrace_write_thp() 141 ret = write(mem_fd, &data, 1); in test_ptrace_write_thp() 345 mem_fd = open("/proc/self/mem", O_RDWR); in main() 346 if (mem_fd < 0) in main()
|
D | uffd-common.c | 26 int mem_fd; in uffd_mem_fd_create() local 30 mem_fd = memfd_create("uffd-test", memfd_flags); in uffd_mem_fd_create() 31 if (mem_fd < 0) in uffd_mem_fd_create() 33 if (ftruncate(mem_fd, mem_size)) in uffd_mem_fd_create() 35 if (fallocate(mem_fd, in uffd_mem_fd_create() 40 return mem_fd; in uffd_mem_fd_create() 81 int mem_fd = uffd_mem_fd_create(size * 2, true); in hugetlb_allocate_area() local 86 mem_fd, offset); in hugetlb_allocate_area() 94 MAP_SHARED, mem_fd, offset); in hugetlb_allocate_area() 107 close(mem_fd); in hugetlb_allocate_area() [all …]
|
D | mremap_dontunmap.c | 132 int mem_fd = memfd_create("memfd", MFD_CLOEXEC); in mremap_dontunmap_simple_shmem() local 133 BUG_ON(mem_fd < 0, "memfd_create"); in mremap_dontunmap_simple_shmem() 135 BUG_ON(ftruncate(mem_fd, num_pages * page_size) < 0, in mremap_dontunmap_simple_shmem() 140 MAP_FILE | MAP_SHARED, mem_fd, 0); in mremap_dontunmap_simple_shmem() 143 BUG_ON(close(mem_fd) < 0, "close"); in mremap_dontunmap_simple_shmem()
|
D | ksm_functional_tests.c | 30 static int mem_fd; variable 518 lseek(mem_fd, (uintptr_t) map + i, SEEK_SET); in test_prot_none() 519 if (write(mem_fd, &i, sizeof(i)) != sizeof(i)) { in test_prot_none() 551 mem_fd = open("/proc/self/mem", O_RDWR); in main() 552 if (mem_fd < 0) in main()
|