Re: [PATCH] mtd: phram: Add the kernel lock down check

From: Richard Weinberger
Date: Thu Nov 14 2024 - 10:56:57 EST


----- Ursprüngliche Mail -----
> Von: "Takashi Iwai" <tiwai@xxxxxxx>
> An: "linux-mtd" <linux-mtd@xxxxxxxxxxxxxxxxxxx>
> CC: "joern" <joern@xxxxxxxxxxxxxxx>, "Miquel Raynal" <miquel.raynal@xxxxxxxxxxx>, "richard" <richard@xxxxxx>, "Vignesh
> Raghavendra" <vigneshr@xxxxxx>, "linux-kernel" <linux-kernel@xxxxxxxxxxxxxxx>, "Fabian Vogt" <fvogt@xxxxxxxx>
> Gesendet: Donnerstag, 14. November 2024 16:44:41
> Betreff: [PATCH] mtd: phram: Add the kernel lock down check

> The phram MTD driver may map any memory pages no matter whether it's
> reserved or whatever used for systems, which basically allows user
> bypassing the lock down.
>
> Add the check and abort the probe if the kernel is locked down for
> LOCKDOWN_DEV_MEM.
>
> Reported-by: Fabian Vogt <fvogt@xxxxxxxx>
> Suggested-by: Fabian Vogt <fvogt@xxxxxxxx>
> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>

Good catch!

Acked-by: Richard Weinberger <richard@xxxxxx>

Thanks,
//richard