All of lore.kernel.org
 help / color / mirror / Atom feed
* how to instrument/debug module loading
@ 2017-09-12 14:49 Cliff Brake
  2017-09-14  6:00 ` Tobin C. Harding
  2017-09-14  6:57 ` Guru Das S
  0 siblings, 2 replies; 3+ messages in thread
From: Cliff Brake @ 2017-09-12 14:49 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to instrument/debug module loading
  2017-09-12 14:49 how to instrument/debug module loading Cliff Brake
@ 2017-09-14  6:00 ` Tobin C. Harding
  2017-09-14  6:57 ` Guru Das S
  1 sibling, 0 replies; 3+ messages in thread
From: Tobin C. Harding @ 2017-09-14  6:00 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* how to instrument/debug module loading
  2017-09-12 14:49 how to instrument/debug module loading Cliff Brake
  2017-09-14  6:00 ` Tobin C. Harding
@ 2017-09-14  6:57 ` Guru Das S
  1 sibling, 0 replies; 3+ messages in thread
From: Guru Das S @ 2017-09-14  6:57 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-14  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-12 14:49 how to instrument/debug module loading Cliff Brake
2017-09-14  6:00 ` Tobin C. Harding
2017-09-14  6:57 ` Guru Das S

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.