[PATCH] mtd: require write permissions for locking and badblock ioctls

Richard Weinberger richard at nod.at
Mon Mar 22 17:54:12 GMT 2021


----- Ursprüngliche Mail -----
> Von: "Rafał Miłecki" <zajec5 at gmail.com>
> An: "Michael Walle" <michael at walle.cc>, "linux-mtd" <linux-mtd at lists.infradead.org>, "linux-kernel"
> <linux-kernel at vger.kernel.org>
> CC: "Miquel Raynal" <miquel.raynal at bootlin.com>, "richard" <richard at nod.at>, "Vignesh Raghavendra" <vigneshr at ti.com>,
> "Greg Kroah-Hartman" <gregkh at linuxfoundation.org>
> Gesendet: Montag, 22. März 2021 17:39:41
> Betreff: Re: [PATCH] mtd: require write permissions for locking and badblock ioctls

> On 03.03.2021 16:57, Michael Walle wrote:
>> MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require
>> write permission. Depending on the hardware MEMLOCK might even be
>> write-once, e.g. for SPI-NOR flashes with their WP# tied to GND. OTPLOCK
>> is always write-once.
>> 
>> MEMSETBADBLOCK modifies the bad block table.
>> 
>> Fixes: f7e6b19bc764 ("mtd: properly check all write ioctls for permissions")
>> Signed-off-by: Michael Walle <michael at walle.cc>
> 
> Should be fine for OpenWrt tools to my best knowledge (and quick testing).
> 
> Acked-by: Rafał Miłecki <rafal at milecki.pl>

Nice!

Acked-by: Richard Weinberger <richard at nod.at>

Thanks,
//richard



More information about the linux-mtd mailing list