Skip to content

Adapt kernel module matching for Linux 6.6+

This MR addresses #20347. The reasoning for the changes is the following:

  1. If we are matching the module's name, then changing "${NAME}.ko" to "${NAME}.ko"* is very unlikely to overmatch, and it matches both the .ko and .ko.xz extensions.
  2. If only matching the .ko ending as -name "*.ko" using find, then -name "*.ko*" might overmatch, so we use -name "*.ko" -or -name "*.ko.xz" instead.
  3. basename "$1" .ko does not accept globs or similar in its SUFFIX (2nd) argument AFAICS, so we use basename | sed instead.

As mentioned in #20347, grepping for .ko does not return other files where the modules' extension (and thus compression) is used explicitly, so I think this MR enough to close the issue. For completeness, I also checked that .ko does not appear in the wiki, translations or submodules.

Merge request reports