public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init/main.c: Do jump_label_init before early_security_init
@ 2024-07-31 21:34 KP Singh
  2024-08-01  1:15 ` Paul Moore
  2024-08-01  7:34 ` Borislav Petkov
  0 siblings, 2 replies; 9+ messages in thread
From: KP Singh @ 2024-07-31 21:34 UTC (permalink / raw)
  To: linux-kernel, linux-security-module; +Cc: paul, kpsingh, bp, sfr

LSM indirect calls being are now replaced by static calls, this requires
a jumpt_table_init before early_security_init where LSM hooks and their
static calls and keys are initialized.

Fixes: 2732ad5ecd5b ("lsm: replace indirect LSM hook calls with static calls")
Signed-off-by: KP Singh <kpsingh@kernel.org>
---
 init/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 206acdde51f5..5bd45af7a49e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -922,6 +922,8 @@ void start_kernel(void)
 	boot_cpu_init();
 	page_address_init();
 	pr_notice("%s", linux_banner);
+	/* LSM and command line parameters use static keys */
+	jump_label_init();
 	early_security_init();
 	setup_arch(&command_line);
 	setup_boot_config();
@@ -933,8 +935,6 @@ void start_kernel(void)
 	boot_cpu_hotplug_init();
 
 	pr_notice("Kernel command line: %s\n", saved_command_line);
-	/* parameters may set static keys */
-	jump_label_init();
 	parse_early_param();
 	after_dashes = parse_args("Booting kernel",
 				  static_command_line, __start___param,
-- 
2.46.0.rc2.264.g509ed76dc8-goog


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

end of thread, other threads:[~2024-08-01 11:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 21:34 [PATCH] init/main.c: Do jump_label_init before early_security_init KP Singh
2024-08-01  1:15 ` Paul Moore
2024-08-01  5:48   ` Nathan Chancellor
2024-08-01  6:14     ` Nathan Chancellor
2024-08-01 11:53       ` KP Singh
2024-08-01  8:34   ` Peter Zijlstra
2024-08-01  8:48     ` Peter Zijlstra
2024-08-01 11:26     ` KP Singh
2024-08-01  7:34 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox