lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJqD8_DZsU6kBxvd+4X136K-Z_q_1Mow6x+d-xWbQjvmA@mail.gmail.com>
Date: Wed, 27 Mar 2024 16:37:24 -0500
From: Rob Herring <robh@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Dinh Nguyen <dinguyen@...nel.org>, linux-kernel@...r.kernel.org, 
	Frank Rowand <frowand.list@...il.com>, Stephen Boyd <sboyd@...nel.org>
Subject: Re: [PATCH v2] nios2: Only use built-in devicetree blob if configured
 to do so

On Fri, Mar 22, 2024 at 1:54 AM Guenter Roeck <linux@...ck-us.net> wrote:
>
> Starting with commit 7b937cc243e5 ("of: Create of_root if no dtb provided
> by firmware"), attempts to boot nios2 images with an external devicetree
> blob result in a crash.
>
> Kernel panic - not syncing: early_init_dt_alloc_memory_arch:
>         Failed to allocate 72 bytes align=0x40
>
> For nios2, a built-in devicetree blob always overrides devicetree blobs
> provided by ROMMON/BIOS. This includes the new dummy devicetree blob.
> Result is that the dummy devicetree blob is used even if an external
> devicetree blob is provided. Since the dummy devicetree blob does not
> include any memory information, memory allocations fail, resulting in
> the crash.
>
> To fix the problem, only use the built-in devicetree blob if
> CONFIG_NIOS2_DTB_SOURCE_BOOL is enabled.
>
> Fixes: 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware")
> Cc: Frank Rowand <frowand.list@...il.com>
> Cc: Stephen Boyd <sboyd@...nel.org>
> Cc: Rob Herring <robh@...nel.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> v2: Mark 'dtb' as __maybe_unused
>
>  arch/nios2/kernel/prom.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

I don't love the ifdef, but seems to be the least invasive for 6.9.

Reviewed-by: Rob Herring <robh@...nel.org>

I have a somewhat more invasive change which checks for top-level
compatible existing to decide whether to use the built-in. That's more
risky as it would affect everyone. We're already doing that elsewhere
and found 1 board that didn't have one.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ