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: <20240925-jungtier-dagewesen-0040c64576a9@brauner>
Date: Wed, 25 Sep 2024 10:21:03 +0200
From: Christian Brauner <brauner@...nel.org>
To: Jan Kara <jack@...e.cz>
Cc: Hongbo Li <lihongbo22@...wei.com>, tytso@....edu, 
	adilger.kernel@...ger.ca, viro@...iv.linux.org.uk, linux-ext4@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, chris.zjh@...wei.com
Subject: Re: [PATCH v2] fs: ext4: support relative path for `journal_path` in
 mount option.

On Wed, Sep 25, 2024 at 09:51:05AM GMT, Jan Kara wrote:
> On Wed 25-09-24 09:56:24, Hongbo Li wrote:
> > The `fs_lookup_param` did not consider the relative path for
> > block device. When we mount ext4 with `journal_path` option using
> > relative path, `param->dirfd` was not set which will cause mounting
> > error.
> > 
> > This can be reproduced easily like this:
> > 
> > mke2fs -F -O journal_dev $JOURNAL_DEV -b 4096 100M
> > mkfs.ext4 -F -J device=$JOURNAL_DEV -b 4096 $FS_DEV
> > cd /dev; mount -t ext4 -o journal_path=`basename $JOURNAL_DEV` $FS_DEV $MNT
> > 
> > Fixes: 461c3af045d3 ("ext4: Change handle_mount_opt() to use fs_parameter")
> > Suggested-by: Christian Brauner <brauner@...nel.org>
> > Signed-off-by: Hongbo Li <lihongbo22@...wei.com>
> > ---
> > v2:
> >   - Change the journal_path parameter as string not bdev, and
> >     determine the relative path situation inside fs_lookup_param.
> >   - Add Suggested-by.
> > 
> > v1: https://lore.kernel.org/all/20240527-mahlen-packung-3fe035ab390d@brauner/
> > ---
> >  fs/ext4/super.c | 4 ++--
> >  fs/fs_parser.c  | 3 +++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > index 16a4ce704460..cd23536ce46e 100644
> > --- a/fs/ext4/super.c
> > +++ b/fs/ext4/super.c
> > @@ -1744,7 +1744,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = {
> >  	fsparam_u32	("min_batch_time",	Opt_min_batch_time),
> >  	fsparam_u32	("max_batch_time",	Opt_max_batch_time),
> >  	fsparam_u32	("journal_dev",		Opt_journal_dev),
> > -	fsparam_bdev	("journal_path",	Opt_journal_path),
> > +	fsparam_string	("journal_path",	Opt_journal_path),
> 
> Why did you change this? As far as I can see the only effect would be that
> empty path will not be allowed (which makes sense) but that seems like an
> independent change which would deserve a comment in the changelog? Or am I
> missing something?

I'll drop the ext4 bit as that can be done independently drop the
conditional.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ