diff mbox series

Add MFD_NOEXEC_SEAL, MFD_EXEC from Linux 6.3 to bits/mman-shared.h

Message ID d1f667ad-37f-47d0-9949-89e024701a5@codesourcery.com
State New
Headers show
Series Add MFD_NOEXEC_SEAL, MFD_EXEC from Linux 6.3 to bits/mman-shared.h | expand

Commit Message

Joseph Myers May 17, 2023, 11:03 p.m. UTC
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.

Comments

Joseph Myers May 25, 2023, 9:35 p.m. UTC | #1
Ping.  This patch 
<https://sourceware.org/pipermail/libc-alpha/2023-May/148238.html> is 
pending review.
Florian Weimer May 26, 2023, 6:49 a.m. UTC | #2
* Joseph Myers:

> diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
> index 91f2cad00f..6684a84a26 100644
> --- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
> +++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
> @@ -32,6 +32,10 @@
>  #  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

Okay.

Thanks,
Florian
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
index 91f2cad00f..6684a84a26 100644
--- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
+++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
@@ -32,6 +32,10 @@ 
 #  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