how to instrument/debug module loading
Hi, I'm trying to better understand the kernel module loading mechanism (for example when you plug in a USB device and a kernel module autoloads). It appears that depmod creates a module.alias map that maps USB info to modules. Is there any way to instrument or observe the actual loading process? I've looking into udev debug logging, and udevadm, but have not found anything yet that shows when this device is installed, this module loads. I'd also be interested in understanding which program is run to do the loading. I assume udev runs this, but again, I'd like to understand the details better. It seems some of the documentation is out of date -- kernel:Documentation/usb/hotplug.txt refers to /proc/sys/kernel/hotplug and /sbin/hotplug -- neither exist on my system. Appreciate any pointers to documentation, etc. My test system is Arch Linux with systemd. Thanks, Cliff
On Tue, Sep 12, 2017 at 10:49:27AM -0400, Cliff Brake wrote:
Hi,
I'm trying to better understand the kernel module loading mechanism (for example when you plug in a USB device and a kernel module autoloads). It appears that depmod creates a module.alias map that maps USB info to modules. Is there any way to instrument or observe the actual loading process? I've looking into udev debug logging, and udevadm, but have not found anything yet that shows when this device is installed, this module loads.
`dmesg` may give you this information.
On 12 September 2017 at 07:49, Cliff Brake <cliff.brake@gmail.com> wrote:
Appreciate any pointers to documentation, etc. My test system is Arch Linux with systemd.
The autoloading, or hot-plugging, behaviour is probably due to the use of the MODULE_DEVICE_TABLE macro in the device driver. Guru Das Srinagesh.
participants (3)
-
Cliff Brake -
Guru Das S -
Tobin C. Harding