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] [day] [month] [year] [list]
Message-ID: <CAOQ4uxjjjYy2eg14J_267R5x+un_zGRNdESYjbRve4TYBb5sCw@mail.gmail.com>
Date: Sat, 23 Aug 2025 12:02:38 +0200
From: Amir Goldstein <amir73il@...il.com>
To: André Almeida <andrealmeid@...lia.com>, 
	Christian Brauner <brauner@...nel.org>, Gabriel Krisman Bertazi <krisman@...nel.org>
Cc: Miklos Szeredi <miklos@...redi.hu>, Theodore Tso <tytso@....edu>, linux-unionfs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, kernel-dev@...lia.com
Subject: Re: [PATCH v6 2/9] fs: Create sb_same_encoding() helper

On Fri, Aug 22, 2025 at 4:17 PM André Almeida <andrealmeid@...lia.com> wrote:
>
> For cases where a file lookup can look in different filesystems (like in
> overlayfs), both super blocks must have the same encoding and the same
> flags. To help with that, create a sb_same_encoding() function.
>
> Reviewed-by: Amir Goldstein <amir73il@...il.com>
> Signed-off-by: André Almeida <andrealmeid@...lia.com>
> ---
>  include/linux/fs.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index a4d353a871b094b562a87ddcffe8336a26c5a3e2..7de9e1e4839a2726f4355ddf20b9babb74cc9681 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -3747,6 +3747,24 @@ static inline bool sb_has_encoding(const struct super_block *sb)
>         return !!sb_encoding(sb);
>  }
>
> +/*
> + * Compare if two super blocks have the same encoding and flags
> + */
> +static inline bool sb_same_encoding(const struct super_block *sb1,
> +                                   const struct super_block *sb2)
> +{
> +#if IS_ENABLED(CONFIG_UNICODE)
> +       if (sb1->s_encoding == sb2->s_encoding)
> +               return true;
> +
> +       return (sb1->s_encoding && sb2->s_encoding &&
> +              (sb1->s_encoding->version == sb2->s_encoding->version) &&
> +              (sb1->s_encoding_flags == sb2->s_encoding_flags));
> +#else
> +       return true;
> +#endif
> +}
> +
>  int may_setattr(struct mnt_idmap *idmap, struct inode *inode,
>                 unsigned int ia_valid);
>  int setattr_prepare(struct mnt_idmap *, struct dentry *, struct iattr *);
>

Christian,

I am planning to stage this series for v6.18 [1].
I think it would be better to avoid splitting the two minor vfs helpers
in first two patches from this series into a stable vfs branch and
would be better to get you RVB on the two vfs patches and let them
go upstream via the ovl tree.

WDYT?

Gabriel,

It would be great if you could also provide RVB for the vfs helpers
and of course, review for the entire series would be most welcome as well.

Thanks,
Amir.

[1] https://lore.kernel.org/linux-unionfs/20250822-tonyk-overlayfs-v6-0-8b6e9e604fa2@igalia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ