diff options
| author | Xiaofeng Yuan <xiaofengmian@163.com> | 2026-08-31 19:11:23 -0600 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-08-31 19:11:23 -0600 |
| commit | 8718e5a3090bbfd759801d088b700aab21e8e989 (patch) | |
| tree | b6f9ce49ec11753ec77bebca8a36ccaa8b988800 /scripts/Makefile.thinlto | |
| parent | bdc46e507b59ac44c8e1dab505121f18c2add1ab (diff) | |
| download | linux-8718e5a3090bbfd759801d088b700aab21e8e989.tar.gz linux-8718e5a3090bbfd759801d088b700aab21e8e989.zip | |
riscv: patch: skip fixmap mapping when kernel text is already writable
patch_map() always creates a temporary writable mapping via fixmap for
kernel text addresses, even when CONFIG_STRICT_KERNEL_RWX is disabled
and the kernel text is already mapped with _PAGE_WRITE.
This is unnecessary overhead at best, and on minimal configurations
it can cause page faults.
Skip the fixmap path for kernel text when CONFIG_STRICT_KERNEL_RWX
is not enabled, since the text pages are already writable in that case.
The module text path is already gated on CONFIG_STRICT_MODULE_RWX and
is kept unchanged.
Reported-by: Klara Modin <klara@kasm.eu>
Closes: https://lore.kernel.org/all/ant_8TaBbov_GS4i@soda.int.kasm.eu/
Reported-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Closes: https://lore.kernel.org/all/CA+V-a8tQK8rih9SGGTyqrEBGpNkx4H0eX2YccCRrgkVAPr+EBg@mail.gmail.com/
Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20260814082742.148403-3-xiaofengmian@163.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
