[PATCH v2 2/2] UBI: Make mtd parameter readable

Richard Weinberger richard at nod.at
Tue Jan 10 05:54:16 PST 2017


Am 10.01.2017 um 14:48 schrieb Andy Shevchenko:
>>> -module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 000);
>>> +module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 0400);
> 
>> What is the use case?
>> AFAIKT the permissions are 000
> 
> If it's not 0 in current case than you easily crash the kernel because
> parser will be gone at that time. This is fixed by patch 1.

Before your changes it was non-issue, right? ;)

> 
>>  because a parser is involved and to
>> "understand" the parameter,
>> a reader needs the ubi_mtd_param_parse() function.
> 
> Are you implying that writer is a bot and reader is human being? 
> The use case is obvious (any security reasons are implied?) -- allow
> user to see what was written there in the first place.

I'm asking for the use case, why is exposing this parameter to user space
a good thing? Who will use it?

> Permissions 0000 are error prone.

Why?

Thanks,
//richard



More information about the linux-mtd mailing list