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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3kq2tbdcoxxw3y2gseg7vtnhnze5ee536fu4rnsn22yjrpsmb4@fpfueqqiji5q>
Date: Wed, 14 Jan 2026 19:11:49 +0100
From: Jan Kara <jack@...e.cz>
To: Chuck Lever <cel@...nel.org>
Cc: vira@...p.suse.de, Christian Brauner <brauner@...nel.org>, 
	Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, 
	linux-xfs@...r.kernel.org, linux-cifs@...r.kernel.org, linux-nfs@...r.kernel.org, 
	linux-f2fs-devel@...ts.sourceforge.net, hirofumi@...l.parknet.co.jp, linkinjeon@...nel.org, 
	sj1557.seo@...sung.com, yuezhang.mo@...y.com, almaz.alexandrovich@...agon-software.com, 
	slava@...eyko.com, glaubitz@...sik.fu-berlin.de, frank.li@...o.com, tytso@....edu, 
	adilger.kernel@...ger.ca, cem@...nel.org, sfrench@...ba.org, pc@...guebit.org, 
	ronniesahlberg@...il.com, sprasad@...rosoft.com, trondmy@...nel.org, anna@...nel.org, 
	jaegeuk@...nel.org, chao@...nel.org, hansg@...nel.org, senozhatsky@...omium.org, 
	Chuck Lever <chuck.lever@...cle.com>
Subject: Re: [PATCH v4 01/16] fs: Add case sensitivity info to file_kattr

On Wed 14-01-26 09:28:44, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@...cle.com>
> 
> Enable upper layers such as NFSD to retrieve case sensitivity
> information from file systems by adding case_insensitive and
> case_nonpreserving boolean fields to struct file_kattr.
> 
> These fields default to false (POSIX semantics: case-sensitive and
> case-preserving), allowing filesystems to set them only when
> behavior differs from the default.
> 
> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
...
> diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
> index 66ca526cf786..07286d34b48b 100644
> --- a/include/uapi/linux/fs.h
> +++ b/include/uapi/linux/fs.h
> @@ -229,10 +229,20 @@ struct file_attr {
>  	__u32 fa_nextents;	/* nextents field value (get)   */
>  	__u32 fa_projid;	/* project identifier (get/set) */
>  	__u32 fa_cowextsize;	/* CoW extsize field value (get/set) */
> +	/* VER1 additions: */
> +	__u32 fa_case_behavior;	/* case sensitivity (get) */
> +	__u32 fa_reserved;
>  };
>  
>  #define FILE_ATTR_SIZE_VER0 24
> -#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0
> +#define FILE_ATTR_SIZE_VER1 32
> +#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER1
> +
> +/*
> + * Case sensitivity flags for fa_case_behavior
> + */
> +#define FS_CASE_INSENSITIVE	0x00000001	/* case-insensitive lookups */
> +#define FS_CASE_NONPRESERVING	0x00000002	/* case not preserved */

This is a matter of taste so not sure what others think about it but
file_attr already have fa_xflags field and there is already one flag which
doesn't directly correspond to on-disk representation (FS_XFLAG_HASATTR) so
we could also put the two new flags in there... I have hard time imagining
fa_case_behavior would grow past the two flags you've introduced so u32
seems a bit wasteful.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ