[PATCH 23/24] mtd: block2mtd: don't call early_lookup_bdev after the system is running

Miquel Raynal miquel.raynal at bootlin.com
Tue May 23 02:34:02 PDT 2023


Hi Christoph,

hch at lst.de wrote on Tue, 23 May 2023 09:45:34 +0200:

> early_lookup_bdev is supposed to only be called from the early boot
> code, but mdtblock_early_get_bdev is called as a general fallback when
> lookup_bdev fails, which is problematic because early_lookup_bdev
> bypasses all normal path based permission checking, and might cause
> problems with certain container environments renaming devices.
> 
> Switch to only call early_lookup_bdev when dm is built-in and the system
> state in not running yet.
> 
> Note that this strictly speaking changes the kernel ABI as the PARTUUID=
> and PARTLABEL= style syntax is now not available during a running
> systems.  They never were intended for that, but this breaks things
> we'll have to figure out a way to make them available again.  But if
> avoidable in any way I'd rather avoid that.

Sounds reasonable to me. Richard?

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>

Thanks,
Miquèl



More information about the linux-mtd mailing list