]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: Handle percpu handler address for ORC unwinder
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 10 Feb 2026 11:31:13 +0000 (19:31 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 10 Feb 2026 11:31:13 +0000 (19:31 +0800)
commit055c7e75190e0be43037bd663a3f6aced194416e
tree469f5947880e9ce7ac369e302b1a94eab1f9696a
parent77403a06d845db1caf9a6b0867b43e9dd8de8e4a
LoongArch: Handle percpu handler address for ORC unwinder

After commit 4cd641a79e69 ("LoongArch: Remove unnecessary checks for ORC
unwinder"), the system can not boot normally under some configs (such as
enable KASAN), there are many error messages "cannot find unwind pc".

The kernel boots normally with the defconfig, so no problem found out at
the first time. Here is one way to reproduce:

  cd linux
  make mrproper defconfig -j"$(nproc)"
  scripts/config -e KASAN
  make olddefconfig all -j"$(nproc)"
  sudo make modules_install
  sudo make install
  sudo reboot

The address that can not unwind is not a valid kernel address which is
between "pcpu_handlers[cpu]" and "pcpu_handlers[cpu] + vec_sz" due to
the code of eentry was copied to the new area of pcpu_handlers[cpu] in
setup_tlb_handler(), handle this special case to get the valid address
to unwind normally.

Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/setup.h
arch/loongarch/kernel/unwind_orc.c