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: <ZwYxVcvyjJR_FM0U@infradead.org>
Date: Wed, 9 Oct 2024 00:31:33 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Gao Xiang <hsiangkao@...ux.alibaba.com>
Cc: Christian Brauner <brauner@...nel.org>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	Christoph Hellwig <hch@...radead.org>,
	Allison Karlitskaya <allison.karlitskaya@...hat.com>,
	Chao Yu <chao@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org, linux-erofs@...ts.ozlabs.org
Subject: Re: [PATCH v2 2/2] erofs: use get_tree_bdev_flags() to avoid
 misleading messages

On Wed, Oct 09, 2024 at 11:31:51AM +0800, Gao Xiang wrote:
> Users can pass in an arbitrary source path for the proper type of
> a mount then without "Can't lookup blockdev" error message.
> 
> Reported-by: Allison Karlitskaya <allison.karlitskaya@...hat.com>
> Closes: https://lore.kernel.org/r/CAOYeF9VQ8jKVmpy5Zy9DNhO6xmWSKMB-DO8yvBB0XvBE7=3Ugg@mail.gmail.com
> Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
> ---
> changes since v1:
>  - use new get_tree_bdev_flags().
> 
>  fs/erofs/super.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 666873f745da..b89836a8760d 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -705,7 +705,9 @@ static int erofs_fc_get_tree(struct fs_context *fc)
>  	if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && sbi->fsid)
>  		return get_tree_nodev(fc, erofs_fc_fill_super);
>  
> -	ret = get_tree_bdev(fc, erofs_fc_fill_super);
> +	ret = get_tree_bdev_flags(fc, erofs_fc_fill_super,
> +		IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE) ?
> +			GET_TREE_BDEV_QUIET_LOOKUP : 0);

Why not pass it unconditionally and provide your own more useful
error message at the end of the function if you could not find any
source?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ