Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 12/11/2024 à 21:28, Luis Chamberlain a écrit :
On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote:
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 1bf4b0db291b..b603c9647e73 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2582,7 +2582,7 @@ static noinline int do_init_module(struct module *mod)
  	rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms);
  #endif
  	ret = module_enable_rodata_ro_after_init(mod);
-	if (ret)
+	if (WARN_ON_ONCE(ret))

Do we want panic on warn systems to crash with this?


I would say yes, for two reasons:
1/ It should never happen
2/ Such systems care about security and don't want vulnerable systems

Christophe




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux