diff options
| author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2026-02-10 19:31:17 +0800 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 07:21:17 -0500 |
| commit | 710657d3d31f9333a2e6e9214d2afad588625671 (patch) | |
| tree | a88d1cac1d4a36d685c1d0920910e788153a15b3 /scripts/objdump-func | |
| parent | 6868bd64dc90980015bbbc9b7117b17c0d8c9ef2 (diff) | |
LoongArch: Disable instrumentation for setup_ptwalker()
[ Upstream commit 7cb37af61f09c9cfd90c43c9275307c16320cbf2 ]
According to Documentation/dev-tools/kasan.rst, software KASAN modes use
compiler instrumentation to insert validity checks. Such instrumentation
might be incompatible with some parts of the kernel, and therefore needs
to be disabled, just use the attribute __no_sanitize_address to disable
instrumentation for the low level function setup_ptwalker().
Otherwise bringing up the secondary CPUs failed when CONFIG_KASAN is set
(especially when PTW is enabled), here are the call chains:
smpboot_entry()
start_secondary()
cpu_probe()
per_cpu_trap_init()
tlb_init()
setup_tlb_handler()
setup_ptwalker()
The reason is the PGD registers are configured in setup_ptwalker(), but
KASAN instrumentation may cause TLB exceptions before that.
Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/objdump-func')
0 files changed, 0 insertions, 0 deletions
