Home
last modified time | relevance | path

Searched refs:mem_fd (Results 1 – 5 of 5) sorted by relevance

/openbmc/linux/tools/testing/selftests/mm/
H A Duffd-common.c25 int mem_fd; in uffd_mem_fd_create() local
30 if (mem_fd < 0) in uffd_mem_fd_create()
32 if (ftruncate(mem_fd, mem_size)) in uffd_mem_fd_create()
34 if (fallocate(mem_fd, in uffd_mem_fd_create()
39 return mem_fd; in uffd_mem_fd_create()
85 mem_fd, offset); in hugetlb_allocate_area()
93 MAP_SHARED, mem_fd, offset); in hugetlb_allocate_area()
106 close(mem_fd); in hugetlb_allocate_area()
142 mem_fd, offset); in shmem_allocate_area()
151 mem_fd, offset); in shmem_allocate_area()
[all …]
H A Dmkdirty.c30 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()
H A Dmremap_dontunmap.c132 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()
H A Dksm_functional_tests.c30 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()
/openbmc/openbmc/meta-raspberrypi/recipes-multimedia/rpidistro-ffmpeg/files/
H A D0004-ffmpeg-4.3.4-rpi_14.patch47958 + int mem_fd;
47961 + if ((mem_fd = open(dev_name, O_RDWR|O_SYNC) ) < 0) {
47972 + mem_fd,
47976 + close(mem_fd); // No longer need the FD