Re: [RFC PATCH 1/2] modules: Make module_enable_x() independant of CONFIG_ARCH_HAS_STRICT_MODULE_RWX

From: Luis Chamberlain
Date: Thu Feb 03 2022 - 15:47:06 EST


On Thu, Feb 03, 2022 at 08:23:25PM +0000, Christophe Leroy wrote:
> module_enable_x() has nothing to do with CONFIG_ARCH_HAS_STRICT_MODULE_RWX
> allthough by coincidence architectures who need module_enable_x() are
> selection CONFIG_ARCH_HAS_STRICT_MODULE_RWX.
>
> Enable module_enable_x() for everyone everytime. If an architecture
> already has module text set executable, it's a no-op.
>
> Only check end boundary if CONFIG_STRICT_MODULE_RWX is set, and
> make sure we entirely get the last page when the boundary is not
> aligned. When CONFIG_STRICT_MODULE_RWX is not selected, it is not
> a big deal to have the start of data as executable.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>

Thanks!

Both patches look good to me! I can merge this once Aaron's
then your's and then Michal's KEXEC stuff gets merged.

Luis