[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220207164659.ap42at2nphxu4q6o@ava.usersys.com>
Date: Mon, 7 Feb 2022 16:46:59 +0000
From: Aaron Tomlin <atomlin@...mlin.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
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
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?
Kind regards,
--
Aaron Tomlin
Powered by blists - more mailing lists