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: <aUC32PJZWFayGO-X@ndev>
Date: Tue, 16 Dec 2025 09:37:51 +0800
From: Jinchao Wang <wangjinchao600@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Christian Brauner <brauner@...nel.org>,
	Hannes Reinecke <hare@...e.de>,
	Luis Chamberlain <mcgrof@...nel.org>, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org,
	syzbot+4d3cc33ef7a77041efa6@...kaller.appspotmail.com,
	syzbot+fdba5cca73fee92c69d6@...kaller.appspotmail.com
Subject: Re: [PATCH] mm/readahead: read min folio constraints under
 invalidate lock

On Mon, Dec 15, 2025 at 02:22:23PM +0000, Matthew Wilcox wrote:
> On Mon, Dec 15, 2025 at 10:19:00PM +0800, Jinchao Wang wrote:
> > page_cache_ra_order() and page_cache_ra_unbounded() read mapping minimum folio
> > constraints before taking the invalidate lock, allowing concurrent changes to
> > violate page cache invariants.
> > 
> > Move the lookups under filemap_invalidate_lock_shared() to ensure readahead
> > allocations respect the mapping constraints.
> 
> Why are the mapping folio size constraints being changed?  They're
> supposed to be set at inode instantiation and then never changed.

They can change after instantiation for block devices. In the syzbot repro:
  blkdev_ioctl() -> blkdev_bszset() -> set_blocksize() ->
  mapping_set_folio_min_order()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ