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: <450769E2.4080904@yahoo.com.au>
Date:	Wed, 13 Sep 2006 12:16:02 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	David Howells <dhowells@...hat.com>
CC:	Matt Mackall <mpm@...enic.com>, Aubrey <aubreylee@...il.com>,
	linux-kernel@...r.kernel.org, davidm@...pgear.com,
	gerg@...pgear.com
Subject: Re: kernel BUGs when removing largish files with the SLOB allocator

David Howells wrote:
> Matt Mackall <mpm@...enic.com> wrote:
> 
> 
>>>+		for (i = 0; i < (1 << bb->order); i++) {
>>>+			SetPageSlab(page);
>>>+			page++;
>>>+		}
>>
>>for ( ; page < page + (1 << bb->order), page++)
>>      SetPageSlab(page);
> 
> 
> Ugh.  No.  You can't do that.  "page < page + X" will be true until "page + X"
> wraps the end of memory.
> 
> 
>>>+				for (i = 0; i < (1 << bb->order); i++) {
>>>+					if (!TestClearPageSlab(page))
>>>+						BUG();
>>>+					page++;
>>>+				}
>>
>>Please drop the BUG. We've already established it's on our lists by
>>this point.
> 
> 
> I disagree.  Let's catch accidental reuse of pages.  It should, however, be
> marked unlikely().

If you do this, the biggest problem with those ops is that they are atomic,
and the latter also requires strong memory barriers. Don't use RMW variants,
and use __ prepended iff you are the only user of the page at this point.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 
-
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