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: <20260120142439.1821554-9-cel@kernel.org>
Date: Tue, 20 Jan 2026 09:24:31 -0500
From: Chuck Lever <cel@...nel.org>
To: Al Viro <viro@...iv.linux.org.uk>,
	Christian Brauner <brauner@...nel.org>,
	Jan Kara <jack@...e.cz>
Cc: <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>,
	"Darrick J. Wong" <djwong@...nel.org>
Subject: [PATCH v6 08/16] xfs: Report case sensitivity in fileattr_get

From: Chuck Lever <chuck.lever@...cle.com>

Upper layers such as NFSD need to query whether a filesystem is
case-sensitive. Report case sensitivity via the FS_XFLAG_CASEFOLD
flag in xfs_fileattr_get(). XFS always preserves case. XFS is
case-sensitive by default, but supports ASCII case-insensitive
lookups when formatted with the ASCIICI feature flag.

Reviewed-by: "Darrick J. Wong" <djwong@...nel.org>
Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
---
 fs/xfs/xfs_ioctl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index f0417c4d1fca..da98d4422b02 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -516,6 +516,13 @@ xfs_fileattr_get(
 	xfs_fill_fsxattr(ip, XFS_DATA_FORK, fa);
 	xfs_iunlock(ip, XFS_ILOCK_SHARED);
 
+	/*
+	 * FS_XFLAG_CASEFOLD indicates case-insensitive lookups with
+	 * case preservation. This matches ASCIICI behavior: lookups
+	 * fold ASCII case while filenames remain stored verbatim.
+	 */
+	if (xfs_has_asciici(ip->i_mount))
+		fa->fsx_xflags |= FS_XFLAG_CASEFOLD;
 	return 0;
 }
 
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ