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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BA95454.1080400@crca.org.au>
Date:	Wed, 24 Mar 2010 10:52:52 +1100
From:	Nigel Cunningham <ncunningham@...a.org.au>
To:	Al Viro <viro@...IV.linux.org.uk>
CC:	Josef Bacik <josef@...hat.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, chris.mason@...cle.com, hch@....de
Subject: Re: [PATCH] Introduce freeze_super and thaw_super for the fsfreeze
 ioctl

Hi.

On 24/03/10 10:18, Al Viro wrote:
> On Wed, Mar 24, 2010 at 09:31:51AM +1100, Nigel Cunningham wrote:
>> /**
>>   * freeze_filesystems - lock all filesystems and force them into a
>> consistent
>>   * state
>>   * @which:      What combination of fuse&  non-fuse to freeze.
>>   */
>> void freeze_filesystems(int which)
>> {
>>          struct super_block *sb;
>>
>>          lockdep_off();
>>
>>          /*
>>           * Freeze in reverse order so filesystems dependant upon others are
>>           * frozen in the right order (eg. loopback on ext3).
>>           */
>
> [snip the horror]
>
> 	a) traversing superblock list without any locking whatsoever
> 	b) accessing superblock fields<....>
> 	c)<.........................>  without making sure that it's not
> going to disappear
> 	d) calling freeze_bdev() without any warranties that its argument
> is not going to be freed under you
> 	e) layering violations all over the place
> etc.
>
> I've stayed away from TuxOnIce flamefests and I've no idea how representative
> that snippet is, but if it *does* match the general code quality in there...
> Ouch.

Locking isn't necessary because of the freezing.

Regards,

Nigel
--
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