Re: [PATCH 09/29] scsi: ufs: Declare the quirks array const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/04/2022 23:14, Bart Van Assche wrote:
> On 4/1/22 12:56, Avri Altman wrote:
>>> Declare the quirks array and also its 'model' member const to make it explicit
>>> that these are not modified.
>>
>> Sometimes it's useful to be able to add a quirk as part of e.g. a debug session in the OEM premises.
>> And not always we are able to recompile the kernel.
>> Since we have a debugfs now, how about adding this capability, instead of blocking it?
> 
> Hmm ... does declaring data const prevent from modifying that data from 
> inside a kernel debugger? Don't kernel debuggers allow to cast away 
> constness?

We strive to make all initdata const for several safety reasons, so such
debugging/hacking session without recompiling the kernel is not a good
reason to abandon that goal.

Such data is already const (or constified in progress) in most of the
kernel places, so why UFS is special? Other subsystems are not...

Best regards,
Krzysztof



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux