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: <18593.8466.965002.476705@notabene.brown>
Date:	Tue, 12 Aug 2008 15:35:14 +1000
From:	Neil Brown <neilb@...e.de>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	netdev@...r.kernel.org, trond.myklebust@....uio.no,
	Daniel Lezcano <dlezcano@...ibm.com>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH 05/30] mm: slb: add knowledge of reserve pages

On Thursday July 24, a.p.zijlstra@...llo.nl wrote:
> Restrict objects from reserve slabs (ALLOC_NO_WATERMARKS) to allocation
> contexts that are entitled to it. This is done to ensure reserve pages don't
> leak out and get consumed.

This looks good (we are still missing slob though, aren't we :-( )

> @@ -1526,7 +1540,7 @@ load_freelist:
>  	object = c->page->freelist;
>  	if (unlikely(!object))
>  		goto another_slab;
> -	if (unlikely(SLABDEBUG && PageSlubDebug(c->page)))
> +	if (unlikely(PageSlubDebug(c->page) || c->reserve))
>  		goto debug;

This looks suspiciously like debugging code that you have left in.
Is it??

> @@ -265,7 +267,8 @@ struct array_cache {
>  	unsigned int avail;
>  	unsigned int limit;
>  	unsigned int batchcount;
> -	unsigned int touched;
> +	unsigned int touched:1,
> +		     reserve:1;

This sort of thing always worries me.
It is a per-cpu data structure so you won't get SMP races corrupting
fields.  But you do get read-modify-write in place of simple updates.
I guess it's not a problem..  But it worries me :-)


NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ