Re: [PATCH 1/2] watchdog: cadence_wdt: Enable access to module parameters
From: Michal Simek
Date: Fri Aug 04 2017 - 09:52:57 EST
On 4.8.2017 15:45, Guenter Roeck wrote:
> On 08/04/2017 12:39 AM, Michal Simek wrote:
>> Give read access to module parameters to all and write access to root.
>> This change also improves driver error path testing.
>>
>> Signed-off-by: Michal Simek <michal.simek@xxxxxxxxxx>
>> ---
>>
>> Please let me know what you think - I can use macros from stat.h if
>> required
>>
>
> Seems to be quite pointless and misleading, since the values are only read
> at probe time. Am I missing something ?
You can unbind device and bind that device again. If you want to use it
or test with different parameters you need to have an access to these
module parameters.
For testing purpose if you setup for example timeout to 1000s which is
more than CDNS_WDT_MAX_TIMEOUT probe will fail and you have better
driver coverage.
I see that a lot of watchdog drivers are using 0 there - means no sysfs
access to these modules parameters. Some of them are using 0644 or 0444
that's why I want to know if there is any for example security reason to
disable access to these parameters.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
Attachment:
signature.asc
Description: OpenPGP digital signature