Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

userfaultfd: remove UFFD_CLOEXEC, UFFD_NONBLOCK, and UFFD_FLAGS_SET

UFFD_CLOEXEC, UFFD_NONBLOCK, and UFFD_FLAGS_SET have been unused since
they were added in commit 932b18e0aec6 ("userfaultfd:
linux/userfaultfd_k.h"). Remove them and the associated BUILD_BUG_ON()
checks.

Link: https://lkml.kernel.org/r/20250619-uffd-fixes-v3-4-a7274d3bd5e4@columbia.edu
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Tal Zussman and committed by
Andrew Morton
5e00e318 31defc3b

-6
-2
fs/userfaultfd.c
··· 2114 2114 2115 2115 /* Check the UFFD_* constants for consistency. */ 2116 2116 BUILD_BUG_ON(UFFD_USER_MODE_ONLY & UFFD_SHARED_FCNTL_FLAGS); 2117 - BUILD_BUG_ON(UFFD_CLOEXEC != O_CLOEXEC); 2118 - BUILD_BUG_ON(UFFD_NONBLOCK != O_NONBLOCK); 2119 2117 2120 2118 if (flags & ~(UFFD_SHARED_FCNTL_FLAGS | UFFD_USER_MODE_ONLY)) 2121 2119 return -EINVAL;
-4
include/linux/userfaultfd_k.h
··· 30 30 * from userfaultfd, in order to leave a free define-space for 31 31 * shared O_* flags. 32 32 */ 33 - #define UFFD_CLOEXEC O_CLOEXEC 34 - #define UFFD_NONBLOCK O_NONBLOCK 35 - 36 33 #define UFFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) 37 - #define UFFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS) 38 34 39 35 /* 40 36 * Start with fault_pending_wqh and fault_wqh so they're more likely