drgn 0.0.26
This release adds several helpers, support for DWARF package files, the fsrefs.py tool, and a few other improvements and bug fixes.
New features:
- The
print_dmesg()helper was added todrgn.helpers.linux.printk. It is a shortcut for printing the contents of the kernel log buffer. - The
idr_for_each_entry()helper was added todrgn.helpers.linux.idr. - Helpers for the Linux kernel's plist (priority-sorted list) data structure were added in
drgn.helpers.linux.plist. Plists are used by futexes, real-time scheduling classes, and swap. - The
stack_depot_fetch()helper was added indrgn.helpers.linux.stackdepot. It gets a stack trace from the stack depot, which is used by KASAN and other debugging tools in the kernel to store unique stack traces. Contributed by Peter Collingbourne. drgn.Program.stack_trace_from_pcs()was added. It creates adrgn.StackTracefrom a list of program counters. Contributed by Peter Collingbourne.- Support for Linux 6.8 was added.
- The
for_each_mount()andpath_lookup()helpers fromdrgn.helpers.linux.fswere updated for Linux 6.8. Thefor_each_mount()update was contributed by Johannes Thumshirn.
- The
- DWARF package (.dwp) files are now supported when built with elfutils >= 0.191.
drgn.reinterpret()can now be used for primitive scalar values (but you usually wantdrgn.cast()).- drgn now transparently supports reading from pointers using AArch64's Top Byte Ignore (TBI) feature. Contributed by Peter Collingbourne.
Bug fixes:
- The
print_annotated_stack()helper fromdrgn.helpers.common.stackwas made more robust against corrupted stack traces. - A memory leak when handling types with C++ template parameters was fixed.
- Types from type units from split DWARF files can now be searched by name.
Other improvements:
drgn.FaultErroris now imported in the CLI by default.drgn.FaultErrors caused by invalid physical addresses will now indicate that the address was physical.- Build errors when compiling against Python 3.13 alpha 4 were fixed.
Tools:
tools/fsrefs.pywas added. It searches for everything in the kernel referencing a file or filesystem.
contrib directory:
contrib/btrfs_orphan_subvolumes.pywas added. It looks for Btrfs subvolumes that have been deleted but not yet cleaned up.contrib/dm_crypt_key.pywas added. It reads the master key of a dm-crypt device from kernel memory (currently only if the encryption mode isaes-xts-plain64).