Hi, Did you have a chance to look at it? I got a response from Linux kernel saying the kernel patch looks ok and they want to know if you are interested in it. https://lore.kernel.org/all/[email protected]/
Thanks, Pnina > This series adds vmcore-tasks, a new userspace tool for extracting per-task > debugging information from Linux vmcore (kdump) files. It is designed as a > lightweight tool, targeting embedded systems where crash-utility may not be > available. > > Motivation > ---------- > > After a kernel panic, kdump produces a vmcore containing a full memory > snapshot. Existing post-mortem tools like crash-utility are powerful but > heavyweight — they require vmlinux with DWARF debug info and a matching > kernel symbol table. On embedded targets with limited storage, stripped > kernels, or unsupported architectures, this is often not practical. > > vmcore-tasks takes a different approach: it requires no vmlinux or DWARF > data. Instead, a kernel-side component exports the necessary struct offsets, > sizes, and symbol addresses into the standard vmcoreinfo note section. This > data, already embedded in the vmcore by kdump, is sufficient to navigate > kernel data structures, allowing it to run directly from crash-kernel, and > only solving bt addresses later with tools like addr2line. > > vmcore-tasks extract: > > - Per-task register state (pt_regs) and user-space backtraces > - VMA memory maps with filename resolution via dentry walk > - Per-thread state for multi-threaded processes > - Kernel dmesg log (reuses existing vmcore-dmesg infrastructure) > > Architecture > ------------ > > The tool is structured in layers: > > util_lib/ Foundation: vmcoreinfo parser, memory reader, > maple tree walker (reuses existing elf_info.c > and adds new shared utilities) > > vmcore_tasks/ Core logic: task enumeration, VMA collection, > generic stack unwinder with arch callbacks > > vmcore_tasks/arch/ Architecture backends: page table translation > and instruction decode (RISC-V 64, MIPS64) > > The generic unwinder in unwind.c drives frame recovery using arch-provided > callbacks (detect SP adjustment, RA save, signal trampolines), so adding a > new architecture requires only implementing the instruction decode — not the > unwinding state machine. > > VMA enumeration auto-selects between the legacy mm_struct->mmap linked list > (kernels < 6.1) and maple tree walk (kernels >= 6.1) based on vmcoreinfo > content. > > Integration with kexec-tools > ---------------------------- > > The new files are placed in vmcore_tasks/ and util_lib/. > The util_lib additions (vmcore_info.c, memory.c, maple_tree.c) are currently > built only by the vmcore_tasks Makefile. > Integration into the main kexec-tools build system can follow once the tool > matures. > > The tool reuses elf_info.c from util_lib for ELF parsing and > paddr_to_offset() for physical-to-file-offset mapping, and reuses > dump_dmesg() from vmcore-dmesg for kernel log extraction. > > Depends on kernel-side patch to export the needed vmcoreinfo values. > Will update with a link to this patch later. > > Testing > ------- > > Validated against vmcore files from controlled kernel panic scenarios on > RISC-V 64-bit (SV39) and MIPS64 platforms, covering multi-frame backtraces, > leaf functions, and signal frame unwinding. Tested both natively and > cross-architecture (x86_64 host processing RISC-V/MIPS64 vmcores). > > Pnina Feder (10): > util_lib: add paddr_to_offset function and expose raw vmcoreinfo data > util_lib: Add vmcoreinfo parser and memory reader > util_lib: Add maple tree walker for VMA enumeration > vmcore_tasks: Add common definitions and project infrastructure > vmcore_tasks: arch: Add RISC-V 64-bit architecture support > vmcore_tasks: arch: Add MIPS64 architecture support > vmcore_tasks: Add generic user-space stack unwinder > vmcore_tasks: Add VMA utilities and task enumeration > vmcore_tasks: Add main entry point and backtrace parser > vmcore_tasks: Add README with project documentation
