[PATCH RFC 2/2] mtd: ubi: add support for protecting critical volumes

Zhihao Cheng chengzhihao1 at huawei.com
Mon Oct 7 19:55:32 PDT 2024


在 2024/10/1 3:54, Richard Weinberger 写道:
> ----- Ursprüngliche Mail -----
>> Von: "Daniel Golle" <daniel at makrotopia.org>
>>> like a ubirmvol ... --i-know-what-im-doing.
>>

Sorry for the delay reply, caused by my holiday.
>> True, enforcement doesn't need to happen in kernel (though I think it's
>> nicer, but really just a matter of taste, I guess). ubi-tools would still
>> need to be able to recognize critical volumes somehow, and that could be
>> done by checking if the 'volume-is-critical' property is present in
>> /sys/class/ubi/ubi*_*/of_node/
> 
> Exactly.
> I also don't mind adding a in-memory 'volume-is-critical' property to
> UBI directly. I'm just a little hesitated to change the UAPI or the on-disk
> data structures for this features.

Add a new interface under the sysfs is fine.
>   
>> If you prefer going down that road instead I will work on patches for
>> git.infradead.org/mtd-utils.git instead.
> 
> Yes. When done in userspace, it's also much easier to offer the --i-know-what-im-doing
> flag to still remove a critical volume.

Looks good, I like it.



More information about the linux-mtd mailing list