Linux Security Modules development
 help / color / mirror / Atom feed
* [PATCH] init/main.c: Initialize early LSMs after arch code
@ 2024-08-01 17:17 KP Singh
  2024-08-05 19:57 ` Paul Moore
  2025-03-11 13:37 ` joeyli
  0 siblings, 2 replies; 35+ messages in thread
From: KP Singh @ 2024-08-01 17:17 UTC (permalink / raw)
  To: linux-kernel, linux-security-module
  Cc: paul, kpsingh, bp, sfr, peterz, nathan

With LSMs using static calls, early_lsm_init needs to wait for setup_arch
for architecture specific functionality which includes jump tables and
static calls to be initialized.

This only affects "early LSMs" i.e. only lockdown when
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is set.

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

diff --git a/init/main.c b/init/main.c
index 206acdde51f5..a0e3f3c720e6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -922,8 +922,8 @@ void start_kernel(void)
 	boot_cpu_init();
 	page_address_init();
 	pr_notice("%s", linux_banner);
-	early_security_init();
 	setup_arch(&command_line);
+	early_security_init();
 	setup_boot_config();
 	setup_command_line(command_line);
 	setup_nr_cpu_ids();
-- 
2.46.0.rc2.264.g509ed76dc8-goog


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

end of thread, other threads:[~2025-03-11 15:14 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 17:17 [PATCH] init/main.c: Initialize early LSMs after arch code KP Singh
2024-08-05 19:57 ` Paul Moore
2024-08-05 23:29   ` KP Singh
2024-08-06  2:20     ` Nathan Chancellor
2024-08-06 21:41       ` Paul Moore
2024-08-07 20:44         ` Paul Moore
2024-08-07 22:45           ` KP Singh
2024-08-07 22:50             ` KP Singh
2024-08-07 23:43             ` Paul Moore
2024-08-08  0:30               ` KP Singh
2024-08-08  0:34               ` Guenter Roeck
2024-08-08  0:40                 ` KP Singh
2024-08-08  1:20                   ` Guenter Roeck
2024-08-08  1:18                 ` Paul Moore
2024-08-08  1:40                   ` Guenter Roeck
2024-08-08  2:13                   ` Guenter Roeck
2024-08-08  4:07                     ` Guenter Roeck
2024-08-08  9:57                       ` KP Singh
2024-08-08 15:20                         ` Guenter Roeck
2024-08-08 16:43                         ` Guenter Roeck
2024-08-08 17:32                           ` Paul Moore
2024-08-08 18:00                             ` Guenter Roeck
2024-08-08 20:49                               ` Paul Moore
2024-08-12 17:12                                 ` KP Singh
2024-08-12 19:33                                   ` Paul Moore
2024-08-12 21:14                                     ` KP Singh
2024-08-12 21:32                                       ` Paul Moore
2024-08-12 22:02                                         ` KP Singh
2024-08-13  4:07                                           ` Guenter Roeck
2024-08-13 15:56                                             ` KP Singh
2024-08-13 16:26                                               ` Guenter Roeck
2024-08-13 18:21                                               ` Paul Moore
2024-08-08 17:19                         ` Paul Moore
2025-03-11 13:37 ` joeyli
2025-03-11 15:14   ` Paul Moore

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