[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221018093725.GC1264@duo.ucw.cz>
Date: Tue, 18 Oct 2022 11:37:25 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Marek Bykowski <marek.bykowski@...il.com>,
Rob Herring <robh@...nel.org>, robh+dt@...nel.org,
frowand.list@...il.com, devicetree@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.9 1/8] of/fdt: Don't calculate initrd size from
DT if start > end
Hi!
> It should be stressed, it is generally a fault of the bootloader's with
> the kernel relying on it, however we should not allow the bootloader's
> misconfiguration to lead to the kernel oops. Not only the kernel
> should be
I believe we should at least printk() if we detect bootloader bug of
this severity.
Best regards,
Pavel
> +++ b/drivers/of/fdt.c
> @@ -917,6 +917,8 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
> if (!prop)
> return;
> end = of_read_number(prop, len/4);
> + if (start > end)
> + return;
>
> __early_init_dt_declare_initrd(start, end);
>
> --
> 2.35.1
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists