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: <aXKuTRfZXE4z0j1_@google.com>
Date: Thu, 22 Jan 2026 23:10:05 +0000
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Nanzhe Zhao <nzzhao@....com>
Cc: Chao Yu <chao@...nel.org>, Barry Song <21cnbao@...il.com>,
	linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix to prevent clearing immutable for
 large folio supported inode

On 01/22, Nanzhe Zhao wrote:
> Hi all:
> 
> 在 2026/1/9 16:44, Chao Yu via Linux-f2fs-devel 写道:
> 
> > w/ above locks, it seems there is still a race condition as below:
> > 
> > f2fs_fileattr_set                read
> >   - f2fs_setflags_common
> >    - truncate_pagecache
> >                          - f2fs_read_data_large_folio
> >                          : read large folios
> >    - mapping_set_folio_order_range
> > 
> > Thanks,
> 
> I noticed that the comment for `mapping_set_folio_order_range()` says:
> 
> > "Context: This should not be called while the inode is active as it is non-atomic."
> 
> I'm not sure whether cases like f2fs_fileattr_set falls into the inode
> active case.
> 
> > > 
> > > 
> > > If clearing immutable is indeed rare, we may leave this as is, since
> > > writes are not supported until the page cache is fully dropped.
> > > Eventually, we will support large folios on non-immutable files.
> > > 
> > > Thanks
> > > Barry
> 
> Also, I couldn’t find any API in `include/linux/pagemap.h` that can
> atomically set the
> folio order range. However, I think dynamically setting large folio order
> while an inode
> is active is a reasonable requirement. In my non immutable file large folio
> write work, I need to enable large folio support for a file when it is
> converted from an inline file to a non-inline file. The lack of an atomic
> API seems to be a blocker for moving large folio write forward.
> Any idea on that?

Yes, I was hitting some issues when I convert the mapping while inode is alive.
So, for now, we should set it in f2fs_iget() only.

> 
> Thanks,
> Nanzhe Zhao
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ