linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] ARM: initialize jump labels before setup_machine_fdt()
@ 2022-06-07  8:29 Phil Elwell
  2022-06-07  8:30 ` Jason A. Donenfeld
  2022-06-07  8:43 ` Jason A. Donenfeld
  0 siblings, 2 replies; 22+ messages in thread
From: Phil Elwell @ 2022-06-07  8:29 UTC (permalink / raw)
  To: Jason A. Donenfeld, linux, rmk+kernel, linux-arm-kernel,
	linux-kernel, catalin.marinas
  Cc: Stephen Boyd, Ard Biesheuvel, stable

This patch is fatal for me in the downstream Raspberry Pi kernel - it locks up 
on boot even before the earlycon output is available. Hacking jump_label_init to 
skip the jump_entry for "crng_is_ready" allows it to boot, but is likely to have 
consequences further down the line.

The stable branch may not be living up to its name, but I don't think this is a 
quick fix.

Phil

^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH v2] ARM: initialize jump labels before setup_machine_fdt()
@ 2022-06-03 12:15 Jason A. Donenfeld
  0 siblings, 0 replies; 22+ messages in thread
From: Jason A. Donenfeld @ 2022-06-03 12:15 UTC (permalink / raw)
  To: linux, rmk+kernel, linux-arm-kernel, linux-kernel, catalin.marinas
  Cc: Jason A. Donenfeld, Stephen Boyd, Ard Biesheuvel, stable

Stephen reported that a static key warning splat appears during early
boot on arm64 systems that credit randomness from device trees that
contain an "rng-seed" property, because setup_machine_fdt() is called
before jump_label_init() during setup_arch(), which was fixed by
73e2d827a501 ("arm64: Initialize jump labels before
setup_machine_fdt()").

Upon cursory inspection, the same basic issue appears to apply to arm32
as well. So this commit adds a call to jump_label_init() just before
setup_machine_fdt().

Reported-by: Stephen Boyd <swboyd@chromium.org>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: stable@vger.kernel.org
Fixes: f5bda35fba61 ("random: use static branch for crng_ready()")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 arch/arm/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 1e8a50a97edf..3ff80b1ee0b5 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -1101,6 +1101,7 @@ void __init setup_arch(char **cmdline_p)
 		atags_vaddr = FDT_VIRT_BASE(__atags_pointer);
 
 	setup_processor();
+	jump_label_init();
 	if (atags_vaddr) {
 		mdesc = setup_machine_fdt(atags_vaddr);
 		if (mdesc)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-06-08  9:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  8:29 [PATCH v2] ARM: initialize jump labels before setup_machine_fdt() Phil Elwell
2022-06-07  8:30 ` Jason A. Donenfeld
2022-06-07  8:47   ` Phil Elwell
2022-06-07  8:51     ` Jason A. Donenfeld
2022-06-07 10:06       ` Catalin Marinas
2022-06-07 10:11         ` Jason A. Donenfeld
2022-06-08  8:20         ` Jason A. Donenfeld
2022-06-08  9:16           ` Catalin Marinas
2022-06-07  9:10     ` Greg KH
2022-06-07 11:04       ` Phil Elwell
2022-06-07 11:09         ` Jason A. Donenfeld
2022-06-07  9:14   ` Russell King (Oracle)
2022-06-07  9:16     ` Jason A. Donenfeld
2022-06-07  8:43 ` Jason A. Donenfeld
2022-06-07  9:15   ` Phil Elwell
2022-06-07 15:14     ` Jason A. Donenfeld
2022-06-07 15:35       ` Phil Elwell
2022-06-07 15:44         ` Jason A. Donenfeld
2022-06-07 15:51           ` Phil Elwell
2022-06-07 19:30           ` [PATCH v3] " Jason A. Donenfeld
2022-06-08  8:18             ` Jason A. Donenfeld
  -- strict thread matches above, loose matches on Subject: below --
2022-06-03 12:15 [PATCH v2] " Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).