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: <CAOQ4uxiwv8F9p8L98BiX8fPBS-HSpNhJ_dtcZAkqM02RA0LuVQ@mail.gmail.com>
Date: Wed, 9 Apr 2025 19:17:15 +0200
From: Amir Goldstein <amir73il@...il.com>
To: André Almeida <andrealmeid@...lia.com>
Cc: Miklos Szeredi <miklos@...redi.hu>, Theodore Tso <tytso@....edu>, 
	Gabriel Krisman Bertazi <krisman@...nel.org>, linux-unionfs@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	Alexander Viro <viro@...iv.linux.org.uk>, Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, 
	kernel-dev@...lia.com
Subject: Re: [PATCH 0/3] ovl: Enable support for casefold filesystems

On Wed, Apr 9, 2025 at 5:01 PM André Almeida <andrealmeid@...lia.com> wrote:
>
> Hi all,
>
> We would like to support the usage of casefold filesystems with
> overlayfs. This patchset do some of the work needed for that, but I'm
> sure there are more places that need to be tweaked so please share your
> feedback for this work.
>
> * Implementation
>
> The most obvious place that required change was the strncmp() inside of
> ovl_cache_entry_find(), that I managed to convert to use d_same_name(),

That's a very niche part of overlayfs where comparison of names matter.

Please look very closely at ovl_lookup() and how an overlay entry stack is
composed from several layers including the option to redirect to different names
via redirect xattr, so there is really very much to deal with other
than readdir.

I suggest that you start with a design proposal of how you intend to tackle this
task and what are your requirements?
Any combination of casefold supported layers?

Thanks,
Amir.

> that will then call the generic_ci_d_compare function if it's set for
> the dentry. There are more strncmp() around ovl, but I would rather hear
> feedback about this approach first than already implementing this around
> the code.
>
> * Testing
>
> I used tmpfs to create a small ovl like this:
>
> sudo mount -t tmpfs -o casefold tmpfs mnt/
> cd mnt/
> mkdir dir
> chattr +F dir
> cd dir/
> mkdir upper lower
> mkdir lower/A lower/b lower/c
> mkdir upper/a upper/b upper/d
> mkdir merged work
> sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work, merged
> ls /tmp/mnt/dir/merged/
> a  b  c  d
>
> And ovl is respecting the equivalent names. `a` points to a merged dir
> between `A` and `a`, but giving that upperdir has a lowercase `a`, this
> is the name displayed here.
>
> Thanks,
>         André
>
> ---
> André Almeida (3):
>       ovl: Make ovl_cache_entry_find support casefold
>       ovl: Make ovl_dentry_weird() accept casefold dentries
>       ovl: Enable support for casefold filesystems
>
>  fs/overlayfs/namei.c     | 11 ++++++-----
>  fs/overlayfs/overlayfs.h |  2 +-
>  fs/overlayfs/ovl_entry.h |  1 +
>  fs/overlayfs/params.c    |  5 +++--
>  fs/overlayfs/readdir.c   | 32 +++++++++++++++++++++-----------
>  fs/overlayfs/util.c      | 12 +++++++-----
>  6 files changed, 39 insertions(+), 24 deletions(-)
> ---
> base-commit: a24588245776dafc227243a01bfbeb8a59bafba9
> change-id: 20250409-tonyk-overlayfs-591f5e4d407a
>
> Best regards,
> --
> André Almeida <andrealmeid@...lia.com>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ