[v2] Add F_SEAL_EXEC from Linux 6.3 to bits/fcntl-linux.h.

Message ID 20230825023140.1384486-1-kolyshkin@gmail.com
State Committed
Commit 42c960a4f1052a71d928a1c554f5d445b00e61f7
Headers
Series [v2] Add F_SEAL_EXEC from Linux 6.3 to bits/fcntl-linux.h. |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

Kir Kolyshkin Aug. 25, 2023, 2:31 a.m. UTC
  This patch adds the new F_SEAL_EXEC constant from Linux 6.3 (see Linux
commit 6fd7353829c ("mm/memfd: add F_SEAL_EXEC") to bits/fcntl-linux.h.

[v2: fix comment]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
---
 sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Adhemerval Zanella Netto Aug. 28, 2023, 5:41 p.m. UTC | #1
On 24/08/23 23:31, Kir Kolyshkin via Libc-alpha wrote:
> This patch adds the new F_SEAL_EXEC constant from Linux 6.3 (see Linux
> commit 6fd7353829c ("mm/memfd: add F_SEAL_EXEC") to bits/fcntl-linux.h.
> 
> [v2: fix comment]
> 
> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> index 1babbdc84e..df378c7b89 100644
> --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> @@ -286,6 +286,7 @@ struct f_owner_ex
>  # define F_SEAL_WRITE	0x0008	/* Prevent writes.  */
>  # define F_SEAL_FUTURE_WRITE	0x0010	/* Prevent future writes while
>  					   mapped.  */
> +# define F_SEAL_EXEC	0x0020	/* Prevent chmod modifying exec bits. */
>  #endif
>  
>  #ifdef __USE_GNU
  
Francis Laniel Sept. 8, 2023, 3:07 p.m. UTC | #2
Hi.


Le vendredi 25 août 2023, 04:31:40 CEST Kir Kolyshkin via Libc-alpha a écrit :
> This patch adds the new F_SEAL_EXEC constant from Linux 6.3 (see Linux
> commit 6fd7353829c ("mm/memfd: add F_SEAL_EXEC") to bits/fcntl-linux.h.
> 
> [v2: fix comment]
> 
> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> ---
>  sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h index 1babbdc84e..df378c7b89
> 100644
> --- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> +++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
> @@ -286,6 +286,7 @@ struct f_owner_ex
>  # define F_SEAL_WRITE	0x0008	/* Prevent writes.  */
>  # define F_SEAL_FUTURE_WRITE	0x0010	/* Prevent future writes while
>  					   mapped.  */
> +# define F_SEAL_EXEC	0x0020	/* Prevent chmod modifying exec bits. */
>  #endif
> 
>  #ifdef __USE_GNU

Thank you for the patch!

Reviewed-by: Francis Laniel <flaniel@linux.microsoft.com>


Best regards.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index 1babbdc84e..df378c7b89 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -286,6 +286,7 @@  struct f_owner_ex
 # define F_SEAL_WRITE	0x0008	/* Prevent writes.  */
 # define F_SEAL_FUTURE_WRITE	0x0010	/* Prevent future writes while
 					   mapped.  */
+# define F_SEAL_EXEC	0x0020	/* Prevent chmod modifying exec bits. */
 #endif
 
 #ifdef __USE_GNU