Add MFD_NOEXEC_SEAL, MFD_EXEC from Linux 6.3 to bits/mman-shared.h
authorJoseph Myers <joseph@codesourcery.com>
Fri, 26 May 2023 15:04:51 +0000 (15:04 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 26 May 2023 15:04:51 +0000 (15:04 +0000)
Linux 6.3 adds new constants MFD_NOEXEC_SEAL and MFD_EXEC.  Add these
to bits/mman-shared.h (conditional on MFD_NOEXEC_SEAL not already
being defined, similar to the existing conditional on the older MFD_*
macros).

Tested for x86_64.

sysdeps/unix/sysv/linux/bits/mman-shared.h

index 91f2cad..6684a84 100644 (file)
 #  define MFD_ALLOW_SEALING 2U
 #  define MFD_HUGETLB 4U
 # endif
+# ifndef MFD_NOEXEC_SEAL
+#  define MFD_NOEXEC_SEAL 8U
+#  define MFD_EXEC 0x10U
+# endif
 
 /* Flags for mlock2.  */
 # ifndef MLOCK_ONFAULT