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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C87D5E9.1060307@s5r6.in-berlin.de>
Date:	Wed, 08 Sep 2010 20:28:57 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Pedro Francisco <pedrogfrancisco@...il.com>
CC:	Alejandro Riveira Fernández <ariveira@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access
 errors follow

Pedro Francisco wrote:
> On Tuesday 07 September 2010 19:21:43 Alejandro Riveira Fernández wrote:
>> El Tue, 7 Sep 2010 18:34:27 +0100
>>
>> Pedro Francisco <pedrogfrancisco@...il.com> escribió:
>>> sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow.
>>>
>>> Now what I'm surprised is not the filesystem errors but me being allowed
>>> to remove the module without using the '-f' option.
>>>
>>> Do note, lsmod |grep ahci reports something like [this is adapted from a
>>> 2.6.32 kernel]:
>>>
>>> ahci                   32200  0
>>>
>>> so it isn't at all surprising I'm being allowed to remove a seemingly
>>> unused module. So....
>>> a) is this supposed to happen?
>>  Yes afaics. root can do many stupid things if (s)he wants
>>  including « rm -rf --no-preserve-root / »
> 
> That makes no sense. That's what the force option "-f" is for. It's my opinion 
> the usage count for ahci on `lsmod' should be 1 and not 0. Whoever still wants 
> to remove it can use the `rmmod -f ahci'

The usage count of a module is only there to ensure that function calls into
the module succeed.  As long as some other part of the kernel has a pointer of
a function in the module, removal of the module needs to be prevented.

"rmmod ahci" on the other hand is something like pulling the SATA cable.  Or
ejection of the controller from an ExpressCard slot.  The driver shutdown
causes the controller device and thus its child devices (disk devices behind
the controller) to go away, and that's it.  You can do also
# echo $DEVICE_ID > /sys/module/ahci/drivers/pci\:ahci/unbind
which tells the driver to let go of the controller.
-- 
Stefan Richter
-=====-==-=- =--= -=---
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ