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: <lxwhxzpuffky4hkw4qgiavv2x5pctb7ka3pnqdyci6w2wd5xch@bt3ehidvftnk>
Date: Thu, 18 Dec 2025 18:27:49 -0600
From: John Groves <John@...ves.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Alistair Popple <apopple@...dia.com>, 
	David Hildenbrand <david@...nel.org>, Oscar Salvador <osalvador@...e.de>, 
	John Groves <jgroves@...ron.com>, "Darrick J . Wong" <djwong@...nel.org>, 
	Dan Williams <dan.j.williams@...el.com>, Gregory Price <gourry@...rry.net>, 
	Balbir Singh <bsingharora@...il.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org, 
	linux-cxl@...r.kernel.org, linux-fsdevel@...r.kernel.org, 
	Aravind Ramesh <arramesh@...ron.com>, Ajay Joshi <ajayjoshi@...ron.com>
Subject: Re: [PATCH] mm/memremap: fix spurious large folio warning for FS-DAX

On 25/12/18 04:03PM, Andrew Morton wrote:
> On Thu, 18 Dec 2025 09:58:02 +1100 Alistair Popple <apopple@...dia.com> wrote:
> 
> > On 2025-12-18 at 08:13 +1100, John Groves <John@...ves.net> wrote...
> > > From: John Groves <John@...ves.net>
> > > 
> > > This patch addresses a warning that I discovered while working on famfs,
> > > which is an fs-dax file system that virtually always does PMD faults
> > > (next famfs patch series coming after the holidays).
> > > 
> > > However, XFS also does PMD faults in fs-dax mode, and it also triggers
> > > the warning. It takes some effort to get XFS to do a PMD fault, but
> > > instructions to reproduce it are below.
> > > 
> > > The VM_WARN_ON_ONCE(folio_test_large(folio)) check in
> > > free_zone_device_folio() incorrectly triggers for MEMORY_DEVICE_FS_DAX
> > > when PMD (2MB) mappings are used.
> > > 
> > > FS-DAX legitimately creates large file-backed folios when handling PMD
> > > faults. This is a core feature of FS-DAX that provides significant
> > > performance benefits by mapping 2MB regions directly to persistent
> > > memory. When these mappings are unmapped, the large folios are freed
> > > through free_zone_device_folio(), which triggers the spurious warning.
> > 
> > Yep, and I'm pretty sure devdax can also create large folios so we might need
> > a similar fix there. In fact looking at old vs. new code it seems we only ever
> > used to have this warning for anon folios, which I think could only ever be true
> > for DEVICE_PRIVATE or DEVICE_COHERENT folios.
> > 
> > So I suspect the proper fix is to just remove the warning entirely now that they
> > also support compound sizes.
> 
> So I'm assuming we can expect an updated version of this fix.

I'll send an update Friday morning

<snip>

Thanks Alistair, Dan and Andrew!

John


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ