Hi Ming,
I'm OK with this patchset. so ack.
Thanks,
Tao Liu
On Thu, Jun 4, 2026 at 11:54 PM Ming Wang <wangming01(a)loongson.cn> wrote:
This series fixes several LoongArch64 crash utility issues seen when
reading CPU register state and unwinding active tasks from vmcore files.
The first two patches fix register extraction from NT_PRSTATUS/crash
notes and initialize the pt_regs.regs offset used for active task register
fallback. The remaining patches improve backtracing across LoongArch
exception frames, fix the stack top boundary check for pt_regs, and avoid
a null eframe_search callback when bt -e is requested.
The NT_PRSTATUS register layout follows the LoongArch kernel
elf_gregset_t/struct pt_regs order: 32 GPRs followed by orig_a0, csr_era,
csr_badvaddr, csr_crmd, csr_prmd, csr_euen, csr_ecfg and csr_estat.
The exception unwinding changes only treat entry symbols that leave a
saved pt_regs at sp as exception frames.
Tested:
- LoongArch 3C6000 platform with vmcore
- make -C crash -j$(nproc) on x86_64 host
- gcc -DLOONGARCH64 -c -o /tmp/loongarch64-final.o loongarch64.c
- gcc -c -o /tmp/loongarch64-final-generic.o loongarch64.c
- git diff --check origin/master..HEAD
Ming Wang (5):
LoongArch64: Fix CPU registers reading from dump notes
LoongArch64: Fix pt_regs initialization for active tasks
LoongArch64: Support backtracing across exception boundaries
LoongArch64: Fix stack frame loop bounds for exception frames
LoongArch64: Add dummy eframe_search to avoid bt -e segfault
loongarch64.c | 78 +++++++++++++++++++++++++++++++++++++++------------
1 file changed, 60 insertions(+), 18 deletions(-)
--
2.43.0