Lines Matching refs:memfd
3 * memfd GUP test-case
4 * This tests memfd interactions with get_user_pages(). We require the
10 * We use this trick to race ADD_SEALS against a write on a memfd object. The
11 * ADD_SEALS must fail if the memfd pages are still pinned. Note that we use
12 * the read() syscall with our memory-mapped memfd object as receive buffer to
13 * force the kernel to write into our memfd object.
24 #include <linux/memfd.h>
260 /* open FUSE memfd file for GUP testing */
268 /* create new memfd-object */
273 /* mmap memfd-object for writing */
277 * the memfd objects with SEAL_WRITE while we write into it */
282 /* Use read() on the FUSE file to read into our memory-mapped memfd
284 * memfd-object.
285 * If @fd is on the memfd-fake-FUSE-FS, the read() is delayed by 1s.
305 /* *IF* the memfd-object was sealed at the time our read() returned,
307 * whatever magic it did..). In that case, the memfd object is still
309 * In case the memfd-object was *not* sealed, the read() was successfull
310 * and the memfd object must *not* be all zero.
317 printf("memfd sealed during read() but data not discarded\n");
320 printf("memfd sealed after read() but data discarded\n");