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: <87wmi9qknr.fsf@mailhost.krisman.be>
Date: Tue, 15 Oct 2024 14:35:20 -0400
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: André Almeida <andrealmeid@...lia.com>
Cc: Gabriel Krisman Bertazi <krisman@...nel.org>,  Alexander Viro
 <viro@...iv.linux.org.uk>,  Christian Brauner <brauner@...nel.org>,  Jan
 Kara <jack@...e.cz>,  Theodore Ts'o <tytso@....edu>,  Andreas Dilger
 <adilger.kernel@...ger.ca>,  Hugh Dickins <hughd@...gle.com>,  Andrew
 Morton <akpm@...ux-foundation.org>,  Jonathan Corbet <corbet@....net>,
  smcv@...labora.com,  kernel-dev@...lia.com,
  linux-fsdevel@...r.kernel.org,  linux-kernel@...r.kernel.org,
  linux-ext4@...r.kernel.org,  linux-mm@...ck.org,
  linux-doc@...r.kernel.org
Subject: Re: [PATCH v6 07/10] tmpfs: Add casefold lookup support

André Almeida <andrealmeid@...lia.com> writes:


> @@ -4663,10 +4756,24 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
>  	sb->s_export_op = &shmem_export_ops;
>  	sb->s_flags |= SB_NOSEC | SB_I_VERSION;
>  
> -	sb->s_d_op = &simple_dentry_operations;
> +	if (!ctx->encoding && ctx->strict_encoding) {
> +		pr_err("tmpfs: strict_encoding option without encoding is forbidden\n");
> +		error = -EINVAL;
> +		goto failed;
> +	}
> +
> +#if IS_ENABLED(CONFIG_UNICODE)
> +	if (ctx->encoding) {
> +		sb->s_encoding = ctx->encoding;
> +		sb->s_d_op = &shmem_ci_dentry_ops;
> +		if (ctx->strict_encoding)
> +			sb->s_encoding_flags = SB_ENC_STRICT_MODE_FL;
> +	}
> +#endif

Actually...

The previous patch moved the dentry ops configuration for the !casefolded case to this
place, only for thsi patch to remove it.  Drop patch 6, instead?

> +
>  #else
>  	sb->s_flags |= SB_NOUSER;
> -#endif
> +#endif /* CONFIG_TMPFS */
>  	sbinfo->max_blocks = ctx->blocks;
>  	sbinfo->max_inodes = ctx->inodes;
>  	sbinfo->free_ispace = sbinfo->max_inodes * BOGO_INODE_SIZE;
> @@ -4940,6 +5047,8 @@ int shmem_init_fs_context(struct fs_context *fc)
>  	ctx->uid = current_fsuid();
>  	ctx->gid = current_fsgid();
>  
> +	ctx->encoding = NULL;
> +
>  	fc->fs_private = ctx;
>  	fc->ops = &shmem_fs_context_ops;
>  	return 0;

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ