Skip to content

drgn 0.0.26

Compare
Choose a tag to compare
@osandov osandov released this 11 Mar 23:30
· 261 commits to main since this release

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 to drgn.helpers.linux.printk. It is a shortcut for printing the contents of the kernel log buffer.
  • The idr_for_each_entry() helper was added to drgn.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 in drgn.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 a drgn.StackTrace from a list of program counters. Contributed by Peter Collingbourne.
  • Support for Linux 6.8 was added.
    • The for_each_mount() and path_lookup() helpers from drgn.helpers.linux.fs were updated for Linux 6.8. The for_each_mount() update was contributed by Johannes Thumshirn.
  • 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 want drgn.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 from drgn.helpers.common.stack was 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.FaultError is 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.py was added. It searches for everything in the kernel referencing a file or filesystem.

contrib directory:

  • contrib/btrfs_orphan_subvolumes.py was added. It looks for Btrfs subvolumes that have been deleted but not yet cleaned up.
  • contrib/dm_crypt_key.py was added. It reads the master key of a dm-crypt device from kernel memory (currently only if the encryption mode is aes-xts-plain64).