[PATCH 0/2] Enable STRICT_MODULE_RWX

haoran.jiang@linux.dev posted 2 patches 1 day, 15 hours ago
arch/loongarch/Kconfig              |  2 +
arch/loongarch/include/asm/fixmap.h |  2 +
arch/loongarch/kernel/inst.c        | 29 +++++++++++-
arch/loongarch/kernel/setup.c       |  1 +
arch/loongarch/mm/init.c            | 71 ++++++++++++++++++++++++++---
5 files changed, 98 insertions(+), 7 deletions(-)
[PATCH 0/2] Enable STRICT_MODULE_RWX
Posted by haoran.jiang@linux.dev 1 day, 15 hours ago
From: Haoran Jiang <jianghaoran@kylinos.cn>

Enable STRICT_MODULE_RWX on LoongArch and
Move fixmap page tables to BSS segment.

Haoran Jiang (2):
  LoongArch: Move fixmap page tables to BSS segment
  LoongArch: Enable STRICT_MODULE_RWX for stricter modules memory
    permissions

 arch/loongarch/Kconfig              |  2 +
 arch/loongarch/include/asm/fixmap.h |  2 +
 arch/loongarch/kernel/inst.c        | 29 +++++++++++-
 arch/loongarch/kernel/setup.c       |  1 +
 arch/loongarch/mm/init.c            | 71 ++++++++++++++++++++++++++---
 5 files changed, 98 insertions(+), 7 deletions(-)

-- 
2.25.1
Re: [PATCH 0/2] Enable STRICT_MODULE_RWX
Posted by Huacai Chen 1 day, 14 hours ago
Hi, Haoran,

On Sat, Jun 6, 2026 at 9:21 PM <haoran.jiang@linux.dev> wrote:
>
> From: Haoran Jiang <jianghaoran@kylinos.cn>
>
> Enable STRICT_MODULE_RWX on LoongArch and
> Move fixmap page tables to BSS segment.
As discussed before, we don't need to change fixmap, we can just use
set_memory() API, similar as done in larch_insn_text_copy().

Huacai

>
> Haoran Jiang (2):
>   LoongArch: Move fixmap page tables to BSS segment
>   LoongArch: Enable STRICT_MODULE_RWX for stricter modules memory
>     permissions
>
>  arch/loongarch/Kconfig              |  2 +
>  arch/loongarch/include/asm/fixmap.h |  2 +
>  arch/loongarch/kernel/inst.c        | 29 +++++++++++-
>  arch/loongarch/kernel/setup.c       |  1 +
>  arch/loongarch/mm/init.c            | 71 ++++++++++++++++++++++++++---
>  5 files changed, 98 insertions(+), 7 deletions(-)
>
> --
> 2.25.1
>
>