Re: [RFC PATCH v4 00/13] module: core code clean up

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

 




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@xxxxxxxxxx/

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




[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