Lines Matching refs:memfd
30 int memfd, ret; in create_memfd_with_seals() local
36 memfd = memfd_create("udmabuf-test", flags); in create_memfd_with_seals()
37 if (memfd < 0) { in create_memfd_with_seals()
42 ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); in create_memfd_with_seals()
48 ret = ftruncate(memfd, size); in create_memfd_with_seals()
54 return memfd; in create_memfd_with_seals()
57 static int create_udmabuf_list(int devfd, int memfd, off64_t memfd_size) in create_udmabuf_list() argument
70 list->list[i].memfd = memfd; in create_udmabuf_list()
136 int devfd, memfd, buf, ret; in main() local
151 memfd = memfd_create("udmabuf-test", MFD_ALLOW_SEALING); in main()
152 if (memfd < 0) { in main()
157 ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); in main()
164 ret = ftruncate(memfd, size); in main()
173 create.memfd = memfd; in main()
183 create.memfd = memfd; in main()
193 create.memfd = 0; /* stdin */ in main()
204 addr1 = mmap_fd(memfd, size); in main()
206 create.memfd = memfd; in main()
217 close(memfd); in main()
221 memfd = create_memfd_with_seals(size, false); in main()
222 addr1 = mmap_fd(memfd, size); in main()
224 buf = create_udmabuf_list(devfd, memfd, size); in main()
234 close(memfd); in main()
239 memfd = create_memfd_with_seals(size, true); in main()
240 addr1 = mmap_fd(memfd, size); in main()
242 buf = create_udmabuf_list(devfd, memfd, size); in main()
252 close(memfd); in main()