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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z78fT2H3BFVv50oI@casper.infradead.org>
Date: Wed, 26 Feb 2025 14:03:59 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Brian Geffon <bgeffon@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Zi Yan <ziy@...dia.com>,
	Kefeng Wang <wangkefeng.wang@...wei.com>,
	Suren Baghdasaryan <surenb@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Baolin Wang <baolin.wang@...ux.alibaba.com>,
	Hugh Dickins <hughd@...gle.com>,
	Marek Maslanka <mmaslanka@...gle.com>
Subject: Re: [PATCH] mm: fix finish_fault() handling for large folios

On Wed, Feb 26, 2025 at 06:48:15AM -0500, Brian Geffon wrote:
> When handling faults for anon shmem finish_fault() will attempt to install
> ptes for the entire folio. Unfortunately if it encounters a single
> non-pte_none entry in that range it will bail, even if the pte that
> triggered the fault is still pte_none. When this situation happens the
> fault will be retried endlessly never making forward progress.
> 
> This patch fixes this behavior and if it detects that a pte in the range
> is not pte_none it will fall back to setting just the pte for the
> address that triggered the fault.

Surely there's a similar problem in do_anonymous_page()?

At any rate, what a horrid function finish_fault() has become.
Special cases all over the place.  What we should be doing is
deciding the range of PTEs to insert, bounded by the folio, the VMA
and any non-none entries.  Maybe I'll get a chance to fix this up.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ