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: <c1f290b7-b4e0-4ec5-b60c-b1e6d3e0f21d@suse.cz>
Date: Thu, 28 Aug 2025 15:23:44 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Max Kellermann <max.kellermann@...os.com>, akpm@...ux-foundation.org,
 david@...hat.com, lorenzo.stoakes@...cle.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pagevec.h: add `const` to pointer parameters of getter
 functions

On 8/28/25 15:03, Max Kellermann wrote:
> For improved const-correctness.
> 
> Signed-off-by: Max Kellermann <max.kellermann@...os.com>

Note that your Cc list is still not according to MAINTAINERS:

./scripts/get_maintainer.pl -f include/linux/pagevec.h 
Andrew Morton <akpm@...ux-foundation.org> (maintainer:MEMORY MANAGEMENT - CORE)
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)
linux-mm@...ck.org (open list:MEMORY MANAGEMENT - CORE)
linux-kernel@...r.kernel.org (open list)

> ---
> v1->v2: reduced patch to just pagevec.h upon David Hildenbrand's suggestion

Assuming you don't intend to stop here, a series with multiple patches logically
gradually expanding the const scope would be better than sending a single patch?

Thanks,
Vlastimil

> ---
>  include/linux/pagevec.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
> index 5d3a0cccc6bf..63be5a451627 100644
> --- a/include/linux/pagevec.h
> +++ b/include/linux/pagevec.h
> @@ -51,12 +51,12 @@ static inline void folio_batch_reinit(struct folio_batch *fbatch)
>  	fbatch->i = 0;
>  }
>  
> -static inline unsigned int folio_batch_count(struct folio_batch *fbatch)
> +static inline unsigned int folio_batch_count(const struct folio_batch *fbatch)
>  {
>  	return fbatch->nr;
>  }
>  
> -static inline unsigned int folio_batch_space(struct folio_batch *fbatch)
> +static inline unsigned int folio_batch_space(const struct folio_batch *fbatch)
>  {
>  	return PAGEVEC_SIZE - fbatch->nr;
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ