Skip to contentSkip to conversation

ARM: initialize jump labels before setup_machine_fdt()

PATCH Superseded Jason A. Donenfeld 1 participant 1 message Jun 3, 2022

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: initialize jump labels before setup_machine_fdt()

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().

Cc Catalin Marinas <[email protected]>
Fixes f5bda35fba61 ("random: use static branch for crng_ready()")
---
 arch/arm/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/setup.c +1 -0
index 1e8a50a97edf..3ff80b1ee0b5 100644
@@ -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)
Signature · 1 line
2.35.1