lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac3eb2510810091437s79a105a4u26953201d556f0d0@mail.gmail.com>
Date:	Thu, 9 Oct 2008 23:37:01 +0200
From:	"Kay Sievers" <kay.sievers@...y.org>
To:	"Arkadiusz Miskiewicz" <a.miskiewicz@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

On Thu, Oct 9, 2008 at 10:18 PM, Arkadiusz Miskiewicz
<a.miskiewicz@...il.com> wrote:
> On Thursday 09 of October 2008, Kay Sievers wrote:
>> On Thu, Oct 9, 2008 at 9:02 PM, Arkadiusz Miskiewicz
>>
>> <a.miskiewicz@...il.com> wrote:
>> > On Thursday 09 October 2008, Kay Sievers wrote:
>> >> On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz
>> >>
>> >> > ... but that ipmi_watchdog is the correct driver that handles
>> >> > /dev/watchdog, so this shouldn't be happening, correct?
>> >>
>> >> While the driver you expect to work is loaded, what does:
>> >>   ls -l /dev/watchdog
>> >> print?
>> >>
>> >> If the devno of this node is 10:130, what does:
>> >>   find /sys/class /sys/devices/ -name dev | xargs grep 10:130
>> >> print?
>> >
>> > # ls -l /dev/watchdog
>> > crw------- 1 root root 10, 130 sie  8 17:00 /dev/watchdog
>> > # find /sys/class /sys/devices/ -name dev | xargs grep 10:130
>> > /sys/class/misc/watchdog/dev:10:130
>>
>> Ok, so you actually have a driver bound to that device number, and it
>> should not trigger the usual module autoloading mechanism.
>>
>> What does:
>>   ls -l /sys/class/misc/watchdog/
>
> # ls -l /sys/class/misc/watchdog/
> razem 0
> -r--r--r-- 1 root root 4096 paź  9 22:02 dev
> drwxr-xr-x 2 root root    0 paź  9 22:02 power
> lrwxrwxrwx 1 root root    0 paź  9 22:22 subsystem -> ../../misc
> -rw-r--r-- 1 root root 4096 paź  9 22:02 uevent
>
>
>> and
>>   ls -l /sys/class/misc/watchdog/device/
>> print?
>
> # LC_ALL=C ls -l /sys/class/misc/watchdog/device/
> ls: cannot access /sys/class/misc/watchdog/device/: No such file or directory
>
>
>> Does the /sys/class/misc/watchdog/ directory exist, before you load
>> the module you expect to be the driver behind /dev/watchdog?
>
> It doesn't exist before. modprobe ipmi_watchdog,
> then /sys/class/misc/watchdog/ becomes available.
>
>> To clarify, the other modules get loaded, after you loaded but module,
>> the above /sys/class/misc/watchdog/ directory exists, and only if you
>> read from the device, all the other modules get loaded?
>
> Exactly.  I load ipmi_watchdog, /sys/class/misc/watchdog/ becomes available
> (no /sys/class/misc/watchdog/device/ though), then cat /dev/watchdog and this
> causes that other watchdog modules are loaded.

Hmm, sounds strange.

Can you create an executable shell script "/mp" like:
  #!/bin/sh
  echo $3 >> /mp.log

point /proc/sys/kernel/modprobe to it:
  echo /mp > /proc/sys/kernel/modprobe

and open the device node. The /mp.log file shows us the alias the
kernel is requesting?

Kay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ