aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
authorStephen Brennan <[email protected]>2022-05-16 17:05:08 -0700
committerakpm <[email protected]>2022-07-17 17:31:39 -0700
commit5fd8fea935a1091083506d0b982fcc5d35062f06 (patch)
tree6026678a593b3ac50efd122f21362f3e34dc22ae /scripts/gdb/linux/modules.py
parent71f8c15565d0f3d2f5b3339845e05cf4f03725cd (diff)
vmcoreinfo: include kallsyms symbols
The internal kallsyms tables contain information which could be quite useful to a debugging tool in the absence of other debuginfo. If kallsyms is enabled, then a debugging tool could parse it and use it as a fallback symbol table. Combined with BTF data, live & post-mortem debuggers can support basic operations without needing a large DWARF debuginfo file available. As many as five symbols are necessary to properly parse kallsyms names and addresses. Add these to the vmcoreinfo note. CONFIG_KALLSYMS_ABSOLUTE_PERCPU does impact the computation of symbol addresses. However, a debugger can infer this configuration value by comparing the address of _stext in the vmcoreinfo with the address computed via kallsyms. So there's no need to include information about this config value in the vmcoreinfo note. To verify that we're still well below the maximum of 4096 bytes, I created a script[1] to compute a rough upper bound on the possible size of vmcoreinfo. On v5.18-rc7, the script reports 3106 bytes, and with this patch, the maximum become 3370 bytes. [1]: https://github.com/brenns10/kernel_stuff/blob/master/vmcoreinfosize/ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Brennan <[email protected]> Acked-by: Baoquan He <[email protected]> Cc: Bixuan Cui <[email protected]> Cc: Dave Young <[email protected]> Cc: David Vernet <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kees Cook <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Sami Tolvanen <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions