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: <uiu7rcmtooxgbscaiiim7czqsca52bgrt6aiszsafq7jj4n3e7@ge6mfzcmnorl>
Date: Thu, 10 Apr 2025 12:35:47 +0200
From: Jan Kara <jack@...e.cz>
To: Alistair Popple <apopple@...dia.com>
Cc: kernel test robot <oliver.sang@...el.com>, Jan Kara <jack@...e.cz>, 
	oe-lkp@...ts.linux.dev, lkp@...el.com, linux-kernel@...r.kernel.org, 
	Andrew Morton <akpm@...ux-foundation.org>, Dan Williams <dan.j.williams@...el.com>, 
	Alison Schofield <alison.schofield@...el.com>, Alexander Gordeev <agordeev@...ux.ibm.com>, 
	Asahi Lina <lina@...hilina.net>, Balbir Singh <balbirs@...dia.com>, 
	Bjorn Helgaas <bhelgaas@...gle.com>, Catalin Marinas <catalin.marinas@....com>, 
	Christian Borntraeger <borntraeger@...ux.ibm.com>, Christoph Hellwig <hch@....de>, 
	Chunyan Zhang <zhang.lyra@...il.com>, "Darrick J. Wong" <djwong@...nel.org>, 
	Dave Chinner <david@...morbit.com>, Dave Hansen <dave.hansen@...ux.intel.com>, 
	Dave Jiang <dave.jiang@...el.com>, David Hildenbrand <david@...hat.com>, 
	Gerald Schaefer <gerald.schaefer@...ux.ibm.com>, Heiko Carstens <hca@...ux.ibm.com>, 
	Huacai Chen <chenhuacai@...nel.org>, Ira Weiny <ira.weiny@...el.com>, 
	Jason Gunthorpe <jgg@...dia.com>, Jason Gunthorpe <jgg@...pe.ca>, 
	John Hubbard <jhubbard@...dia.com>, linmiaohe <linmiaohe@...wei.com>, 
	Logan Gunthorpe <logang@...tatee.com>, Matthew Wilcow <willy@...radead.org>, 
	Michael Camp Drill Sergeant Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>, 
	Peter Xu <peterx@...hat.com>, Sven Schnelle <svens@...ux.ibm.com>, Ted Ts'o <tytso@....edu>, 
	Vasily Gorbik <gor@...ux.ibm.com>, Vishal Verma <vishal.l.verma@...el.com>, 
	Vivek Goyal <vgoyal@...hat.com>, WANG Xuerui <kernel@...0n.name>, Will Deacon <will@...nel.org>, 
	linux-fsdevel@...r.kernel.org, nvdimm@...ts.linux.dev, linux-xfs@...r.kernel.org
Subject: Re: [linus:master] [fs/dax]  bde708f1a6:
 WARNING:at_mm/truncate.c:#truncate_folio_batch_exceptionals

On Thu 10-04-25 17:01:26, Alistair Popple wrote:
> On Thu, Apr 10, 2025 at 01:14:42PM +0800, kernel test robot wrote:
> > 
> > 
> > Hello,
> > 
> > kernel test robot noticed "WARNING:at_mm/truncate.c:#truncate_folio_batch_exceptionals" on:
> > 
> > commit: bde708f1a65d025c45575bfe1e7bf7bdf7e71e87 ("fs/dax: always remove DAX page-cache entries when breaking layouts")
> 
> This is warning about hitting the bug that commit 0e2f80afcfa6 ("fs/dax: ensure
> all pages are idle prior to filesystem unmount") fixes. I couldn't reorder that
> patch before this one because it relies on the DAX page-cache entries always
> being removed when breaking layouts.
> 
> However I note that this is ext2. Commit 0e2f80afcfa6 doesn't actually update
> ext2 so the warning will persist. The fix should basically be the same as for
> ext4:
> 
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -74,6 +74,8 @@ void ext2_evict_inode(struct inode * inode)
>         struct ext2_block_alloc_info *rsv;
>         int want_delete = 0;
>  
> +        dax_break_layout_final(inode);
> +
>         if (!inode->i_nlink && !is_bad_inode(inode)) {
>                 want_delete = 1;
>                 dquot_initialize(inode);
> 
> What's more troubling though is unlike ext4 there is no ext2_dax_break_layouts()
> defined, which is how I missed updating it. That means truncate with FS DAX
> is already pretty broken for ext2, and will need more than just the above fix
> to ensure DAX pages are idle before truncate. So I think FS DAX on ext2 should
> probably just be removed or marked broken unless someone with more knowledge of
> ext2 wants to fix it up?

Yeah, with a hindsight, implementing fsdax for ext2 was a mistake (although
it was meant as a replacement for the old execute-in-place feature that
ext2 had for s390 and which we wanted to remove). At this point when pmem
didn't lift off and DAX ended up being kind of niche, I think the effort
to maintain DAX in ext2 is not justified and we should just drop it (and
direct existing users to use ext4 driver instead for the cases where they
need it). I'll have a look into it.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ