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] [day] [month] [year] [list]
Message-ID: <1298551213.2428.43.camel@twins>
Date:	Thu, 24 Feb 2011 13:40:13 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	Nick Piggin <npiggin@...nel.dk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Wu Fengguang <fengguang.wu@...el.com>,
	Salman Qazi <sqazi@...gle.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] mm: don't return 0 too early from find_get_pages()

On Wed, 2011-02-23 at 21:35 -0800, Hugh Dickins wrote:
> Callers of find_get_pages(), or its wrapper pagevec_lookup() - notably
> truncate_inode_pages_range() - stop looking further when it returns 0.
> 
> But if an interrupt comes just after its radix_tree_gang_lookup_slot(),
> especially if we have preemptible RCU enabled, isn't it conceivable
> that all 14 pages returned could be removed from the page cache by
> shrink_page_list(), before find_get_pages() gets to process them?  So
> causing it to return 0 although there may be plenty more pages beyond.
> 
> Make find_get_pages() and find_get_pages_tag() check for this unlikely
> case, and restart should it occur; but callers of find_get_pages_contig()
> have no such expectation, it's okay for that to return 0 early.
> 
> I have not seen this in practice, just worried by the possibility.
> 
> Signed-off-by: Hugh Dickins <hughd@...gle.com>

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
--
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