On Thu, Jan 3, 2013 at 9:46 AM, shawn wilson <ag4ve...@gmail.com> wrote:
> On the box I login to gmail on, I don't have this so I'm going to try > to replicate this as best i can: > /lib/modules/3.6.10-vanilla/build/drivers/input/mouse# lsmod | grep psmouse > psmouse 69191 0 > /lib/modules/3.6.10-vanilla/build/drivers/input/mouse# modinfo psmouse.ko > filename: > /lib/modules/3.6.10-vanilla/build/drivers/input/mouse/psmouse.ko > > license: GPL > description: PS/2 mouse driver > author: Vojtech Pavlik <vojt...@suse.cz> > alias: serio:ty05pr*id*ex* > alias: serio:ty01pr*id*ex* > depends: > intree: Y > vermagic: 3.6.10-vanilla SMP mod_unload modversions > parm: proto:Highest protocol extension to probe (bare, imps, > exps, any > ). Useful for KVM switches. (proto_abbrev) > parm: resolution:Resolution, in dpi. (uint) > parm: rate:Report rate, in reports per second. (uint) > parm: smartscroll:Logitech Smartscroll autorepeat, 1 = enabled > (defaul > t), 0 = disabled. (bool) > parm: resetafter:Reset device after so many bad packets (0 = > never). ( > uint) > parm: resync_time:How long can mouse stay idle before forcing > resync ( > in seconds, 0 = never). (uint) > /lib/modules/3.6.10-vanilla/build/drivers/input/mouse# cp psmouse.ko ~/ > /lib/modules/3.6.10-vanilla/build/drivers/input/mouse# cd ~ > ~# modinfo psmouse.ko > filename: /root/psmouse.ko > license: GPL > description: PS/2 mouse driver > author: Vojtech Pavlik <vojt...@suse.cz> > alias: serio:ty05pr*id*ex* > alias: serio:ty01pr*id*ex* > depends: > intree: Y > vermagic: 3.6.10-vanilla SMP mod_unload modversions > parm: proto:Highest protocol extension to probe (bare, imps, > exps, any > ). Useful for KVM switches. (proto_abbrev) > parm: resolution:Resolution, in dpi. (uint) > parm: rate:Report rate, in reports per second. (uint) > parm: smartscroll:Logitech Smartscroll autorepeat, 1 = enabled > (defaul > t), 0 = disabled. (bool) > parm: resetafter:Reset device after so many bad packets (0 = > never). ( > uint) > parm: resync_time:How long can mouse stay idle before forcing > resync ( > in seconds, 0 = never). (uint) > > This is of course the same module, but I can modprobe -r psmouse; > insmod ~/psmouse.ko and there's no telling which module is loaded. > Again this is an example since I'm not on the example box with two > different versions of the same module where I started wondering this > (I just unloaded and reloaded to make sure I was right about what was > loaded). But, if I change some code (or just build a module template > named psmouse) it will show up and I don't know how to tell the > difference between what shows up in lsmod and what is in > /lib/modules/$(uname -r) > > On Wed, Jan 2, 2013 at 5:28 PM, Igor Cicimov <icici...@gmail.com> wrote: > > On Thu, Jan 3, 2013 at 1:54 AM, shawn wilson <ag4ve...@gmail.com> wrote: > >> > >> So, this is more of a curiosity at this point. However, I can't figure > >> out how to directly associate loaded modules with the file on disk - > >> checksum or whatever. Not sure if there's a debugfs module to do this, > >> I've looked in /proc and /sys and can't find anything useful. > >> /proc/sys/kernel > >> /sys/devices/system/cpu/kernel_max > >> /sys/kernel > >> /sys/module/kernel > >> > >> Again, I can run lsmod and see what modules are loaded and run modinfo > >> and look at metadata of a kernel object module on the filesystem but > >> how do I forensically connect the two? > >> > >> > >> -- > >> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > >> with a subject of "unsubscribe". Trouble? Contact > >> listmas...@lists.debian.org > >> Archive: > >> > http://lists.debian.org/cah_obico9rbcfg4cpgaecr-_munhqphceg4hedzlhtku6gf...@mail.gmail.com > >> > > The first line of modinfo is the filename ... or I'm misunderstanding > your > > question? > > > Well I guess lsmod doesn't need to show anything since the default path for the kernel modules is under /lib/modules/`uname -r` as you said. There is a /etc/modules.conf which is the kernel modules configuration file where you can create aliases, override module path etc. if you want (read the manual page for modules.conf, example http://linux.about.com/od/commands/l/blcmdl5_modules.htm). By the way, by manually loading something from different location but the default one don't you already know the location of that file :)