[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0a54f00-b9ac-df55-e8d2-d3eb95039a95@csgroup.eu>
Date: Mon, 7 Feb 2022 17:17:35 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Aaron Tomlin <atomlin@...mlin.com>
CC: Luis Chamberlain <mcgrof@...nel.org>,
Aaron Tomlin <atomlin@...hat.com>,
Michal Suchanek <msuchanek@...e.de>,
"cl@...ux.com" <cl@...ux.com>,
"pmladek@...e.com" <pmladek@...e.com>,
"mbenes@...e.cz" <mbenes@...e.cz>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"jeyu@...nel.org" <jeyu@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"live-patching@...r.kernel.org" <live-patching@...r.kernel.org>,
"ghalat@...hat.com" <ghalat@...hat.com>,
"allen.lkml@...il.com" <allen.lkml@...il.com>,
"void@...ifault.com" <void@...ifault.com>,
"joe@...ches.com" <joe@...ches.com>
Subject: Re: [RFC PATCH v4 00/13] module: core code clean up
Le 07/02/2022 à 17:46, Aaron Tomlin a écrit :
> On Thu 2022-02-03 18:01 +0000, Christophe Leroy wrote:
>> I don't know exactly what was the motivation for commit 93651f80dcb6
>> ("modules: fix compile error if don't have strict module rwx") at the
>> first place but it is just wrong and we should fix it.
>
> Christophe,
>
> I think we are in agreement. If I understand correctly, it should not be
> possible to enable CONFIG_STRICT_MODULE_RWX without
> CONFIG_ARCH_HAS_STRICT_MODULE_RWX (or inversely), as per arch/Kconfig:
>
> config STRICT_MODULE_RWX
> bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX
> depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES
> default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
>
> The objective of Linus' commit ad21fc4faa2a1 ("arch: Move
> CONFIG_DEBUG_RODATA and CONFIG_SET_MODULE_RONX to be common") and in
> particular commit 0f5bf6d0afe4b ("arch: Rename CONFIG_DEBUG_RODATA and
> CONFIG_DEBUG_MODULE_RONX") does seem correct. So, architectures that would
> prefer to make this feature selectable rather than enabled by default
> should continue to have this option.
>
>> module_enable_x() should work just fine regardless of
>> CONFIG_ARCH_HAS_STRICT_MODULE_RWX.
>
> As per the above, we should fix commit 93651f80dcb6 ("modules: fix compile
> error if don't have strict module rwx") so a stub for module_enable_x()
> would no longer be required, right?
>
Yes and that's the purpose of the patch I proposed at
https://patchwork.kernel.org/project/linux-modules/patch/203348805c9ac9851d8939d15cb9802ef047b5e2.1643919758.git.christophe.leroy@csgroup.eu/
Allthough I need to find out what's the problem reported by the robot.
As suggested by Luis, this fix should go once all ongoing work is done.
But it would be nice if you could just remove patch 5 from you series,
otherwise we would have to revert it later.
Thanks
Christophe
Powered by blists - more mailing lists