[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa0f038e-3066-49de-bcab-97a779735665@csgroup.eu>
Date: Wed, 13 Nov 2024 07:49:24 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: Petr Pavlu <petr.pavlu@...e.com>, Sami Tolvanen
<samitolvanen@...gle.com>, Daniel Gomez <da.gomez@...sung.com>,
Kees Cook <kees@...nel.org>, linux-modules@...r.kernel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data
read-only
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
Powered by blists - more mailing lists