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: <963f880b-826f-4276-a73e-da5fdd02a6ae@linux.alibaba.com>
Date: Sat, 18 Jan 2025 16:45:26 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Ian Kent <raven@...maw.net>, Chen Linxuan <chenlinxuan@...ontech.com>,
 Gao Xiang <xiang@...nel.org>, Chao Yu <chao@...nel.org>,
 Yue Hu <zbestahu@...il.com>, Jeffle Xu <jefflexu@...ux.alibaba.com>,
 Sandeep Dhavale <dhavale@...gle.com>
Cc: linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] erofs: add error log in erofs_fc_parse_param



On 2025/1/18 09:25, Ian Kent wrote:
> On 18/1/25 08:45, Ian Kent wrote:
>> On 17/1/25 16:52, Chen Linxuan wrote:
>>> While reading erofs code, I notice that `erofs_fc_parse_param` will
>>> return -ENOPARAM, which means that erofs do not support this option,
>>> without report anything when `fs_parse` return an unknown `opt`.
>>>
>>> But if an option is unknown to erofs, I mean that option not in
>>> `erofs_fs_parameters` at all, `fs_parse` will return -ENOPARAM,
>>> which means that `erofs_fs_parameters` should has returned earlier.
>>
>> I'm pretty sure than the vfs deals with reporting unknown options
>>
>> and returns -EINVAL already.
>>
>>
>> I think the caller oferofs_fc_parse_param() is vfs_parse_fs_param()
>>
>> and for an -ENOPARAM return will ultimately do this:
>>
>> return invalf(fc, "%s: Unknown parameter '%s'", fc->fs_type->name, param->key);
>>
>> which does this.
>>
>> The thing about this is the mount API macro deals with (or it should,
>>
>> although I'm not sure that's completely sorted out yet) logging the
>>
>> message to the console log as well as possibly making it available to
>>
>> mount api system calls. I'm pretty sure this change will prevent the
>>
>> error message being available for mount api system calls to retrieve.
> 
> Actually no, removing the default switch branch does look like the right thing
> 
> to do, my mistake. The call to fs_parse() will return -NOPARAM so the
> 
> switch doesn't need to handle that case.
> 
> 
> Oops!

Yeah, actually dead code..

Thanks,
Gao Xiang

> 
>>
>> Ian
>>
>>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ