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: <CAO4qAqJ+rPXXGeAtOPLJhaRXDNKK+8X-MnWcygiOt1aTSnEwYA@mail.gmail.com>
Date: Tue, 23 Dec 2025 23:49:20 +0530
From: Deepak Karn <dkarn@...hat.com>
To: Jan Kara <jack@...e.cz>
Cc: Matthew Wilcox <willy@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm/filemap: make release_folio mandatory and add block_release_folio

On Mon, Dec 22, 2025 at 9:18 PM Jan Kara <jack@...e.cz> wrote:
>
> On Mon 22-12-25 15:13:26, Matthew Wilcox wrote:
> > On Mon, Dec 22, 2025 at 01:38:51PM +0100, Jan Kara wrote:
> > > > Filesystems updated: adfs, affs, bfs, exfat, ext2, fat, hpfs, isofs,
> > > > jfs, minix, nilfs2, ntfs3, omfs, udf, ufs, plus block/fops.c
> > >
> > > I think affs_aops_ofs need .release_folio as well...
> > >
> > > Also befs_aops, ecryptfs_aops, efs_aops, vxfs_aops, hfs_aops, hfsplus_aops,
> > > nilfs_buffer_cache_aops, qnx4_aops, qnx6_aops definitely need .release_folio. ntfs_aops_cmpr
> > > might need it as well - not sure.
> >
> > If we were using a real programming language, we'd have a class for
> > BH-based filesystems, inherit from it and override each method.  But since
> > we aren't, let's see what we can do in C ...
> >
> > #define BH_DEFAULT_AOPS                                               \
> >       .dirty_folio            = block_dirty_folio,            \
> >       .invalidate_folio       = block_invalidate_folio,       \
> >       .migrate_folio          = buffer_migrate_folio,         \
> >       .is_partially_uptodate  = block_is_partially_uptodate,  \
> >       .error_remove_folio     = generic_error_remove_folio,
> >
> > As I understand C, later initialisers override earlier ones [1].
>
> Frankly, I'm not 100% convinced this will be a win and there is definitely
> a potential for surprises because filesystems tend to do weird things so
> this will need to carefully go filesystem by filesystem... So I wouldn't
> complicate this patch with a change like this. Let's clean up
> .release_folio first and we can look into cutting boilerplate
> initializations later.
>

Thank you Jan and Matthew for the review.

@Jan, I will address the feedback for adding release_folio, in missing
filesystems. I will check
and add it wherever I find it missing/needed.

   - affs_aops_ofs
   - befs_aops
   - ecryptfs_aops
   - efs_aops
   - vxfs_aops
   - hfs_aops
   - hfsplus_aops
   - nilfs_buffer_cache_aops
   - qnx4_aops
   - qnx6_aops
   - ntfs_aops_cmpr

As there are more changes, and to be honest this being one of my first
patches of this scale, I am
trying to test it as thoroughly as possible.

@Matthew, I see what you were suggesting for the BH_DEFAULT_AOPS
macro, it would be
nice to have, but let me first try to get all the filesystems that
need the .release_folio
cleanup first. Once these changes are acceptable I can explore
reducing boilerplate
suggestions as a follow-up.


Thanks,
Deepakkumar Karn


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ