drgn/libdrgn
Omar Sandoval 91ede0c6a4 libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4
The ORC format changed twice recently:

- Linux kernel commit ffb1b4a41016 ("x86/unwind/orc: Add 'signal' field
  to ORC metadata") (in v6.3).
- Linux kernel commit fb799447ae29 ("x86,objtool: Split
  UNWIND_HINT_EMPTY in two") (in v6.4).

The former went unnoticed because the change was subtle, and the latter
completely broke x86-64 kernel stack traces.

To handle this, let's "upgrade" the format to the latest version when we
load and sort the ORC information. This is more work upfront but avoids
needing to handle the version differences every time we use ORC to
unwind.

Unfortunately, ORC currently doesn't have any sort of versioning, so we
have to break the rule of not checking kernel versions. However, I have
a kernel patch pending merging that should fix this for the future.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2023-06-22 15:27:39 -07:00
..
build-aux libdrgn: don't cache ORC sections in struct drgn_elf_file 2023-06-22 15:27:39 -07:00
examples Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
include libdrgn: replace copies of elfutils headers with generated files 2022-11-01 15:41:53 -07:00
m4 libdrgn: add autoconf option to enable compiler warnings 2022-03-01 15:38:05 -08:00
python drgn.helpers.linux.mm: add arbitrary address translation helpers 2023-06-02 23:40:38 -07:00
.gitignore libdrgn: use memswitch for linux_kernel_object_find 2022-02-08 02:03:11 -08:00
arch_aarch64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_aarch64.c libdrgn: platform: replace demangle_return_address() with demangle_cfi_registers() 2022-12-02 13:52:06 -08:00
arch_arm.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_i386.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_ppc64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_ppc64.c libdrgn: ppc64: fix stack unwinding since Linux v5.11 and before v4.20 2023-01-04 13:42:28 -08:00
arch_riscv.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_s390x_defs.py libdrgn: add s390x unwinding support 2022-12-19 13:48:44 -08:00
arch_s390x.c libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
arch_x86_64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_x86_64.c libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
array.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
binary_buffer.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
binary_buffer.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
binary_search_tree.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
bitops.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cfi.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cfi.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cityhash.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
configure.ac drgn 0.0.22 2023-01-05 20:38:32 -08:00
debug_info.c libdrgn: add prog pointer to struct drgn_module 2023-06-22 15:27:39 -07:00
debug_info.h libdrgn: add prog pointer to struct drgn_module 2023-06-22 15:27:39 -07:00
Doxyfile libdrgn: add read(2) and pread(2) wrappers that don't return short reads 2022-08-26 12:43:20 -07:00
drgn_program_parse_vmcoreinfo.inc.strswitch Add some missing copyright/license notices 2022-11-01 17:14:02 -07:00
drgn.h.in libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
dwarf_constants.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
dwarf_constants.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
dwarf_info.c libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
dwarf_info.h libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
elf_file.c libdrgn: handle DWARF sections exactly* like libdw 2023-06-20 13:45:04 -07:00
elf_file.h libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
error.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
error.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
hash_table.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
hash_table.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
helpers.h drgn.helpers.linux.mm: add arbitrary address translation helpers 2023-06-02 23:40:38 -07:00
io.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
io.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
kdump.c libdrgn: add stub s390 and s390x architectures with relocation implementation 2022-12-19 13:48:44 -08:00
language_c.c Add support for looking up types in namespaces 2023-01-19 10:19:36 -08:00
language.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
language.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lazy_object.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lazy_object.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lexer.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lexer.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
linux_kernel_helpers.c drgn.helpers.linux.mm: add arbitrary address translation helpers 2023-06-02 23:40:38 -07:00
linux_kernel_object_find.inc.strswitch libdrgn: linux_kernel: add object finder for jiffies 2023-02-22 11:15:37 -08:00
linux_kernel.c libdrgn: linux_kernel: get slightly smaller code for kernel_module_iterator_next() 2023-06-22 15:27:39 -07:00
linux_kernel.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
Makefile.am libdrgn: use strswitch for ELF section names 2023-02-08 13:25:22 -08:00
memory_reader.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
memory_reader.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
minmax.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
nstring.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
object_index.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
object_index.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
object.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
object.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
orc_info.c libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
orc_info.h libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
orc.h libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
path.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
path.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
platform.c libdrgn: add stub s390 and s390x architectures with relocation implementation 2022-12-19 13:48:44 -08:00
platform.h libdrgn: platform: expand on page table iterator documentation 2023-02-21 17:42:22 -08:00
pp.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
program.c libdrgn: fix Linux kernel crashed_thread() on non-x86 architectures 2023-06-15 07:56:19 -07:00
program.h libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
register_state.c libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
register_state.h libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
serialize.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
serialize.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
splay_tree.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
stack_trace.c libdrgn: platform: replace demangle_return_address() with demangle_cfi_registers() 2022-12-02 13:52:06 -08:00
stack_trace.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
string_builder.c libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
string_builder.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
symbol.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
symbol.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
type.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
type.h libdrgn: use new include-what-you-use exported declarations and fix warnings 2023-05-24 00:25:25 -07:00
util.h libdrgn: document implementation-defined behavior in add_to_possibly_null_pointer() 2022-12-19 12:07:40 -08:00
vector.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
vector.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00