public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, catalin.marinas@arm.com
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	stable@vger.kernel.org
Subject: [PATCH v2] ARM: initialize jump labels before setup_machine_fdt()
Date: Fri,  3 Jun 2022 14:15:43 +0200	[thread overview]
Message-ID: <20220603121543.360283-1-Jason@zx2c4.com> (raw)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-06-03 12:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 12:15 Jason A. Donenfeld [this message]
     [not found] <8cc7ebe4-442b-a24b-9bb0-fce6e0425ee6@raspberrypi.com>
2022-06-07  8:30 ` [PATCH v2] ARM: initialize jump labels before setup_machine_fdt() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220603121543.360283-1-Jason@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox