Linux's modprobe Adds The Ability To Load A Module From Anywhere On The File-System
With today's release of kmod 31, Linux's modprobe utility for loading kernel modules can finally allow arbitrary paths to allow loading new kernel modules from anywhere on the file-system.
Surprisingly it took until 2023 for allowing Linux's modprobe to accept loading kernel modules from any arbitrary path. Rather than just specifying the module name and then looking up the module within the running kernel's modules directory, modprobe can now allow passing a path to the module. Relative paths are also supported when prefixed with "./" for the path to the desired module.
Adding the ability to specify custom paths to modules was motivated by kernel developers for easier testing of just-compiled modules without first having to use insmod or similar for inserting the module to the running kernel's modules directory. The commit adding the patch by Intel's Gustavo Sousa explains, "they can load the module from the path while getting all the benefits of modprobe (e.g. module dependency resolution)."
In the kmod 31 announcement today adds that this feature is great to avoid having to load the dependencies manually or overriding the modules within /usr/lib/modules/. For Intel's part it's motivated by work on their i915 kernel driver.
Kmod 31 also now uses in-kernel decompression where available, build system improvements, and other fixes and enhancements.
Surprisingly it took until 2023 for allowing Linux's modprobe to accept loading kernel modules from any arbitrary path. Rather than just specifying the module name and then looking up the module within the running kernel's modules directory, modprobe can now allow passing a path to the module. Relative paths are also supported when prefixed with "./" for the path to the desired module.
Adding the ability to specify custom paths to modules was motivated by kernel developers for easier testing of just-compiled modules without first having to use insmod or similar for inserting the module to the running kernel's modules directory. The commit adding the patch by Intel's Gustavo Sousa explains, "they can load the module from the path while getting all the benefits of modprobe (e.g. module dependency resolution)."
In the kmod 31 announcement today adds that this feature is great to avoid having to load the dependencies manually or overriding the modules within /usr/lib/modules/. For Intel's part it's motivated by work on their i915 kernel driver.
Kmod 31 also now uses in-kernel decompression where available, build system improvements, and other fixes and enhancements.
35 Comments