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: <27737.1270588344@redhat.com>
Date:	Tue, 06 Apr 2010 22:12:24 +0100
From:	David Howells <dhowells@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	dhowells@...hat.com, akpm@...ux-foundation.org, npiggin@...e.de,
	paulmck@...ux.vnet.ibm.com, corbet@....net,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] radix_tree_tag_get() is not as safe as the docs make out

Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> Looks like a reasonable patch, but the one thing you didn't say is whether 
> there is any code that relies on the incorrectly documented behavior?

Sorry, yes.  I've made an assumption in FS-Cache that I can rely on the result
of radix_tree_tag_get() simply by wrapping it in an rcu_read_lock()'d section.
This has proven not to be so, since the BUG_ON() at line 602 in
lib/radix-tree.c triggered.

I was protecting set/clear/delete from each other, but not protecting get from
set/clear/delete.

> How did you find this? Do we need to fix actual code too? The only user 
> seems to be your fscache/page.c thing, and I'm not seeing any locking 
> except for the rcu locking that is apparently not sufficient.

As mentioned above, someone reported a bug in fscache that led me to this:

	https://www.redhat.com/archives/linux-cachefs/2010-April/msg00013.html

I may need to fix fscache, but I wanted to see if anyone would suggest an
alternate patch that would continue to let me make a test without having to
grab the spinlock first.

I'll update the patch to reflect this, whatever the final patch ends up being.

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