Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debuginfo: kernel modules with hyphen in filename
The module debuginfo code is already written to be careful with respect to module names that have hyphens and underscores. The filenames may not match the name that the kernel uses (e.g. filenames may contain hyphens, while the kernel's name contains underscores). However, we were clearly not careful enough. When kernel module debuginfo is installed directly on the system, the loader did not search for the hyphenated version of module names with underscores. This led to missing debuginfo for modules like "dm_mod" (whose filename is dm-mod.ko.debug). Notably, the error did not occur on systems where drgn-tools extracts the RPM, since we take pains to rename all modules so their filename uses underscores instead of hyphens. The result is that this bug only really occurs when the debuginfo package is installed on the system. Update the _find_debuginfo() function to allow hyphens or underscores, and check for the existence of both. Signed-off-by: Stephen Brennan <[email protected]>
- Loading branch information