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: <27a21510-e9e8-4eb2-9e26-618c103d49c6@redhat.com>
Date: Thu, 28 Aug 2025 14:28:58 +0200
From: David Hildenbrand <david@...hat.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 Max Kellermann <max.kellermann@...os.com>
Cc: akpm@...ux-foundation.org, Liam.Howlett@...cle.com, vbabka@...e.cz,
 rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: add `const` to lots of pointer parameters

On 28.08.25 14:24, Lorenzo Stoakes wrote:
> You've not cc'd the right people here.
> 
> Please run scripts/get_maintainers.pl on your patch series and cc all
> maintainers and reviewers on every series please, as well as all of the mailing
> lists referenced.
> 
> For this change you needed to CC:
> 
> Alexander Viro <viro@...iv.linux.org.uk> (maintainer:FILESYSTEMS (VFS and infrastructure))
> Christian Brauner <brauner@...nel.org> (maintainer:FILESYSTEMS (VFS and infrastructure))
> Jan Kara <jack@...e.cz> (reviewer:FILESYSTEMS (VFS and infrastructure))
> Andrew Morton <akpm@...ux-foundation.org> (maintainer:MEMORY MANAGEMENT - CORE,commit_signer:1/1=100%)
> David Hildenbrand <david@...hat.com> (maintainer:MEMORY MANAGEMENT - CORE)
> Lorenzo Stoakes <lorenzo.stoakes@...cle.com> (reviewer:MEMORY MANAGEMENT - CORE)
> "Liam R. Howlett" <Liam.Howlett@...cle.com> (reviewer:MEMORY MANAGEMENT - CORE)
> Vlastimil Babka <vbabka@...e.cz> (reviewer:MEMORY MANAGEMENT - CORE)
> Mike Rapoport <rppt@...nel.org> (reviewer:MEMORY MANAGEMENT - CORE)
> Suren Baghdasaryan <surenb@...gle.com> (reviewer:MEMORY MANAGEMENT - CORE)
> Michal Hocko <mhocko@...e.com> (reviewer:MEMORY MANAGEMENT - CORE)
> Axel Rasmussen <axelrasmussen@...gle.com> (maintainer:MEMORY MANAGEMENT - MGLRU (MULTI-GEN LRU))
> Yuanchu Xie <yuanchu@...gle.com> (maintainer:MEMORY MANAGEMENT - MGLRU (MULTI-GEN LRU))
> Wei Xu <weixugc@...gle.com> (reviewer:MEMORY MANAGEMENT - MGLRU (MULTI-GEN LRU))
> "Matthew Wilcox (Oracle)" <willy@...radead.org> (maintainer:PAGE CACHE)
> Hugh Dickins <hughd@...gle.com> (maintainer:TMPFS (SHMEM FILESYSTEM))
> Baolin Wang <baolin.wang@...ux.alibaba.com> (reviewer:TMPFS (SHMEM FILESYSTEM))
> David Rientjes <rientjes@...gle.com> (reviewer:MEMORY MANAGEMENT - OOM KILLER)
> Shakeel Butt <shakeel.butt@...ux.dev> (reviewer:MEMORY MANAGEMENT - OOM KILLER)
> linux-fsdevel@...r.kernel.org (open list:FILESYSTEMS (VFS and infrastructure))
> linux-kernel@...r.kernel.org (open list)
> linux-mm@...ck.org (open list:MEMORY MANAGEMENT - CORE)
> 
> Usually I'd cc for you here but that's too many :)
> 
> On Wed, Aug 27, 2025 at 09:22:33PM +0200, Max Kellermann wrote:
>> For improved const-correctness.
> 
> 'const-correctness' in C is extremely weak.
> 
>>
>> Signed-off-by: Max Kellermann <max.kellermann@...os.com>
> 
> It feels like this is a bit of an arbitrary subset and this churn is going
> to make merge conflicts much more likely.
> 
> I mean, if it's just that all this functions accept non-const VMA and for
> all callers _from_ these functions most accept const - it's not really
> accomplishing much other than adding a bunch of noise.
> 
> Any meaningful change would require pretty huge amounts of change that
> would be horrendous git blame, merge conflict, etc. wise for really not a
> huge amount of benefit.
> 
> I feel like the ship has sailed for this and I really question the value of
> doing this in this way.

I recall that Willy did some more targeted conversions of that kind in the past regarding folios.

E.g.,

commit 68158bfa3dbd4af8461ef75a91ffc03be942c8fe
Author: Matthew Wilcox (Oracle) <willy@...radead.org>
Date:   Sat Oct 5 21:01:15 2024 +0100

     mm: mass constification of folio/page pointers
     
     Now that page_pgoff() takes const pointers, we can constify the pointers
     to a lot of functions.

I would appreciate similarly doing it in logical chunks.

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ