]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
memfd: move MFD_ALL_FLAGS definition to memfd.h
authorAndrew Morton <akpm@linux-foundation.org>
Sun, 31 Aug 2025 19:29:57 +0000 (12:29 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:28 +0000 (17:25 -0700)
It's not part of the UAPI, but putting it here is better from a
maintainability POV.
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Joey Pabalinas <joeypabalinas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/uapi/linux/memfd.h
mm/memfd.c

index 273a4e15dfcffdf293a2f68f7df30b3d9b681733..6439cdeaaf256b0ccdc92e027e6f6d85b0cf8571 100644 (file)
@@ -12,6 +12,8 @@
 #define MFD_NOEXEC_SEAL                0x0008U
 /* executable */
 #define MFD_EXEC               0x0010U
+#define MFD_ALL_FLAGS          (MFD_CLOEXEC | MFD_ALLOW_SEALING | \
+                                MFD_HUGETLB | MFD_NOEXEC_SEAL | MFD_EXEC)
 
 /*
  * Huge page size encoding when MFD_HUGETLB is specified, and a huge page
index 1d109c1acf211b3c3c777ffda539a8089a0b7536..1de610e9f2ea2339c69b3e6d7d05267e73bc4940 100644 (file)
@@ -313,8 +313,6 @@ long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg)
 #define MFD_NAME_PREFIX_LEN (sizeof(MFD_NAME_PREFIX) - 1)
 #define MFD_NAME_MAX_LEN (NAME_MAX - MFD_NAME_PREFIX_LEN)
 
-#define MFD_ALL_FLAGS (MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB | MFD_NOEXEC_SEAL | MFD_EXEC)
-
 static int check_sysctl_memfd_noexec(unsigned int *flags)
 {
 #ifdef CONFIG_SYSCTL