[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ae3a950-8c1e-a212-e557-8f112a16457d@csgroup.eu>
Date: Thu, 3 Feb 2022 18:01:21 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Luis Chamberlain <mcgrof@...nel.org>,
Aaron Tomlin <atomlin@...hat.com>,
Michal Suchanek <msuchanek@...e.de>
CC: "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>,
"atomlin@...mlin.com" <atomlin@...mlin.com>,
"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 03/02/2022 à 01:20, Luis Chamberlain a écrit :
> On Sun, Jan 30, 2022 at 09:32:01PM +0000, Aaron Tomlin wrote:
>> Hi Luis,
>>
>> As per your suggestion [1], this is an attempt to refactor and split
>> optional code out of core module support code into separate components.
>> This version is based on branch mcgrof/modules-next since a97ac8cb24a3/or
>> modules-5.17-rc1. Please let me know your thoughts.
>>
>> Changes since v1 [2]:
>
I have another comment: I think patch 5 should be dropped.
Having something behave based on a CONFIG_ARCH_HAS_SOMETHING item is
wrong. It is not because a plateform selects
CONFIG_ARCH_HAS_STRICT_MODULE_RWX that the module core should behave
differentely than with other platforms as far as the user has not
selected CONFIG_STRICT_MODULE_RWX.
And the topic here is wrong. It is a coincidence if making that stuff
depend on CONFIG_ARCH_HAS_STRICT_MODULE_RWX works. This is just because
the only architectures that do the module allocation without Exec flag
are architectures that have also selected
CONFIG_ARCH_HAS_STRICT_MODULE_RWX. But it should also work on other
architectures.
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.
module_enable_x() should work just fine regardless of
CONFIG_ARCH_HAS_STRICT_MODULE_RWX.
Thanks
Christophe
Powered by blists - more mailing lists