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: <anny6rybowuoul5frpcurykpegeo6bcy64nzx2toduckzxvjye@wf2xukl5fcsu>
Date: Tue, 13 Jan 2026 12:50:03 +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 v3 13/16] isofs: Implement fileattr_get for case
 sensitivity

On Mon 12-01-26 12:46:26, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@...cle.com>
> 
> Upper layers such as NFSD need a way to query whether a
> filesystem handles filenames in a case-sensitive manner so
> they can provide correct semantics to remote clients. Without
> this information, NFS exports of ISO 9660 filesystems cannot
> properly advertise their filename case behavior.
> 
> Implement isofs_fileattr_get() to report ISO 9660 case
> handling behavior. The 'check=r' (relaxed) mount option
> enables case-insensitive lookups, and this setting determines
> the value reported through the file_kattr structure. By
> default, Joliet extensions operate in relaxed mode while plain
> ISO 9660 uses strict (case-sensitive) mode. All ISO 9660
> variants are case-preserving, meaning filenames are stored
> exactly as they appear on the disc.
> 
> The callback is registered only on isofs_dir_inode_operations
> because isofs has no custom inode_operations for regular
> files, and symlinks use the generic page_symlink_inode_operations.
> 
> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/isofs/dir.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
> index 09df40b612fb..717cdf726e83 100644
> --- a/fs/isofs/dir.c
> +++ b/fs/isofs/dir.c
> @@ -12,6 +12,7 @@
>   *  isofs directory handling functions
>   */
>  #include <linux/gfp.h>
> +#include <linux/fileattr.h>
>  #include "isofs.h"
>  
>  int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode)
> @@ -266,6 +267,15 @@ static int isofs_readdir(struct file *file, struct dir_context *ctx)
>  	return result;
>  }
>  
> +static int isofs_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
> +{
> +	struct isofs_sb_info *sbi = ISOFS_SB(dentry->d_sb);
> +
> +	fa->case_insensitive = sbi->s_check == 'r';
> +	fa->case_preserving = true;
> +	return 0;
> +}
> +
>  const struct file_operations isofs_dir_operations =
>  {
>  	.llseek = generic_file_llseek,
> @@ -279,6 +289,7 @@ const struct file_operations isofs_dir_operations =
>  const struct inode_operations isofs_dir_inode_operations =
>  {
>  	.lookup = isofs_lookup,
> +	.fileattr_get = isofs_fileattr_get,
>  };
>  
>  
> -- 
> 2.52.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ