Re: [RFC] kallsyms: embed source file:line info in kernel stack traces

Sasha Levin <[email protected]> Tue, 3 Mar 2026 17:47:43 -0500
Newsgroups dev.linux.lists.ksummit
Message-ID <aadlD1KrCqquinJT@laps>
On Tue, Mar 03, 2026 at 11:44:27PM +0100, Helge Deller wrote:
>On 3/2/26 21:28, Sasha Levin wrote:
>>Add CONFIG_KALLSYMS_LINEINFO, which embeds a compact address-to-line
>>lookup table in the kernel image so stack traces directly print source
>>file and line number information:
>>
>>   root@localhost:~# echo c > /proc/sysrq-trigger
>>   [   11.201987] sysrq: Trigger a crash
>>   [   11.202831] Kernel panic - not syncing: sysrq triggered crash
>>   [   11.206218] Call Trace:
>>   [   11.206501]  <TASK>
>>   [   11.206749]  dump_stack_lvl+0x5d/0x80 (lib/dump_stack.c:94)
>
>Thanks Sasha!
>That's exactly what I often needed.
>I've just tested it on the parisc architecture and it works nicely.

That's great! Thanks for testing it!

>So, I'd appreciate if it would be included in the upstream kernel
>(with the memory optimizations others already suggested).

I've sent[1] a more formal patch series that both adds support for modules
which didn't exist in the RFC as well as the suggested memory optimizaions.


[1] https://lore.kernel.org/all/[email protected]/T/#mc834c81dfc8cfef2eaabc0da231d313049a2dcec

-- 
Thanks,
Sasha