Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit b9f174c8 authored by Omar Sandoval's avatar Omar Sandoval Committed by Peter Zijlstra
Browse files

x86/unwind/orc: Add ELF section with ORC version identifier

Commits ffb1b4a4 ("x86/unwind/orc: Add 'signal' field to ORC
metadata") and fb799447 ("x86,objtool: Split UNWIND_HINT_EMPTY in
two") changed the ORC format. Although ORC is internal to the kernel,
it's the only way for external tools to get reliable kernel stack traces
on x86-64. In particular, the drgn debugger [1] uses ORC for stack
unwinding, and these format changes broke it [2]. As the drgn
maintainer, I don't care how often or how much the kernel changes the
ORC format as long as I have a way to detect the change.

It suffices to store a version identifier in the vmlinux and kernel
module ELF files (to use when parsing ORC sections from ELF), and in
kernel memory (to use when parsing ORC from a core dump+symbol table).
Rather than hard-coding a version number that needs to be manually
bumped, Peterz suggested hashing the definitions from orc_types.h. If
there is a format change that isn't caught by this, the hashing script
can be up...
parent 858fd168
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment