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]
Date:	Fri, 6 May 2011 20:21:51 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	"Figo.zhang" <figo1802@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>, mel@....ul.ie,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	kamezawa.hiroyu@...fujisu.com, minchan.kim@...il.com,
	Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH]mm/compation.c: checking page in lru twice

On Fri, May 06, 2011 at 07:32:46PM +0800, Figo.zhang wrote:
> 
> in isolate_migratepages() have check page in LRU twice, the next one
> at _isolate_lru_page(). 

hugetlbfs or any other compound page won't have PageLRU set and they
may go away from under us leading to compound_order not being reliable
if we remove the PageLRU check before compound_order. So we need to
verify the page is in LRU before running compound_order safely. And if
we hold the lru_lock, the page won't be isolated under us, and we know
it's not going to get splitted either.

We might use compound_trans_order but that's only reliable if run on
the head page so it's not so reliable, and so far it's only used by
memory-failure to "diminish" the risk of races in reading the compound
order, but it's not the best having to use compound_trans_order (and
memory-failure remains unsafe w.r.t to hugetlbfs being released during
hwpoisoning, so compound_trans_order might have to be improved for
it).
--
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