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: <39fa2184-e5f4-4709-961c-292917e358e9@huawei.com>
Date: Wed, 25 Sep 2024 10:32:55 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Al Viro <viro@...iv.linux.org.uk>
CC: <tytso@....edu>, <adilger.kernel@...ger.ca>, <brauner@...nel.org>,
	<jack@...e.cz>, <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 2024/9/25 10:09, Al Viro wrote:
> On Wed, Sep 25, 2024 at 09:56:24AM +0800, Hongbo Li wrote:
>> @@ -156,6 +156,9 @@ int fs_lookup_param(struct fs_context *fc,
>>   		f = getname_kernel(param->string);
>>   		if (IS_ERR(f))
>>   			return PTR_ERR(f);
>> +		/* for relative path */
>> +		if (f->name[0] != '/')
>> +			param->dirfd = AT_FDCWD;
> 
> Will need to dig around for some context, but this bit definitely makes
> no sense - dirfd is completely ignored for absolute pathnames, so making
> that store conditional is pointless.
> 

Only do it for relative path. As mentioned in [1], if the "journal_path" 
is treated as FSCONFIG_SET_PATH may be better, but mount(8) is passing a 
string (which uses FSCONFIG_SET_STRING for "journal_path"). For the 
relative path case, the dirfd should be assigned.

[1] 
https://lore.kernel.org/all/20240527-mahlen-packung-3fe035ab390d@brauner/

Thanks,
Hongbo

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ