lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f595e7e845bc7f52c0a2c8978e3e81e860faeb71.camel@kernel.org>
Date: Wed, 03 Dec 2025 09:01:55 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>, 
 Chuck Lever <chuck.lever@...cle.com>, Alexander Aring
 <alex.aring@...il.com>, Jan Kara <jack@...e.cz>,  Christian Brauner	
 <brauner@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: use UAPI types for new struct delegation definition

On Wed, 2025-12-03 at 14:57 +0100, Thomas Weißschuh wrote:
> Using libc types and headers from the UAPI headers is problematic as it
> introduces a dependency on a full C toolchain.
> 
> Use the fixed-width integer types provided by the UAPI headers instead.
> 
> Fixes: 1602bad16d7d ("vfs: expose delegation support to userland")
> Fixes: 4be9e04ebf75 ("vfs: add needed headers for new struct delegation definition")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
>  include/uapi/linux/fcntl.h | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h
> index 5e277fd955aa..aadfbf6e0cb3 100644
> --- a/include/uapi/linux/fcntl.h
> +++ b/include/uapi/linux/fcntl.h
> @@ -4,11 +4,7 @@
>  
>  #include <asm/fcntl.h>
>  #include <linux/openat2.h>
> -#ifdef __KERNEL__
>  #include <linux/types.h>
> -#else
> -#include <stdint.h>
> -#endif
>  
>  #define F_SETLEASE	(F_LINUX_SPECIFIC_BASE + 0)
>  #define F_GETLEASE	(F_LINUX_SPECIFIC_BASE + 1)
> @@ -90,9 +86,9 @@
>  
>  /* Argument structure for F_GETDELEG and F_SETDELEG */
>  struct delegation {
> -	uint32_t	d_flags;	/* Must be 0 */
> -	uint16_t	d_type;		/* F_RDLCK, F_WRLCK, F_UNLCK */
> -	uint16_t	__pad;		/* Must be 0 */
> +	__u32	d_flags;	/* Must be 0 */
> +	__u16	d_type;		/* F_RDLCK, F_WRLCK, F_UNLCK */
> +	__u16	__pad;		/* Must be 0 */
>  };
>  
>  /*
> 
> ---
> base-commit: 3f9f0252130e7dd60d41be0802bf58f6471c691d
> change-id: 20251203-uapi-fcntl-f49d5b30f8cd
> 
> Best regards,

Thanks. I wasn't sure of the right way to do this.

Acked-by: Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ