lkml.org 
[lkml]   [2022]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-10-18 11:38    [W:0.101 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site