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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8a76d62-6250-4294-b11f-661e1aba574c@lucifer.local>
Date: Mon, 1 Sep 2025 15:50:10 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: akpm@...ux-foundation.org, david@...hat.com, axelrasmussen@...gle.com,
        yuanchu@...gle.com, willy@...radead.org, hughd@...gle.com,
        mhocko@...e.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
        surenb@...gle.com, vishal.moola@...il.com, linux@...linux.org.uk,
        James.Bottomley@...senpartnership.com, deller@....de,
        agordeev@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
        hca@...ux.ibm.com, gor@...ux.ibm.com, borntraeger@...ux.ibm.com,
        svens@...ux.ibm.com, davem@...emloft.net, andreas@...sler.com,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
        hpa@...or.com, chris@...kel.net, jcmvbkbc@...il.com,
        viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
        weixugc@...gle.com, baolin.wang@...ux.alibaba.com, rientjes@...gle.com,
        shakeel.butt@...ux.dev, thuth@...hat.com, broonie@...nel.org,
        osalvador@...e.de, jfalempe@...hat.com, mpe@...erman.id.au,
        nysal@...ux.ibm.com, linux-arm-kernel@...ts.infradead.org,
        linux-parisc@...r.kernel.org, linux-s390@...r.kernel.org,
        sparclinux@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v5 09/12] mm: constify ptdesc_pmd_pts_count() and
 folio_get_private()

On Mon, Sep 01, 2025 at 02:30:25PM +0200, Max Kellermann wrote:
> These functions from mm_types.h are trivial getters that should never
> write to the given pointers.
>
> Signed-off-by: Max Kellermann <max.kellermann@...os.com>
> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@...il.com>

(Again, on basis of us figuring out whether we want the double-const)

LGTM, so:

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>

> ---
>  include/linux/mm_types.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index d934a3a5b443..46e27ee14bcf 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -632,7 +632,7 @@ static inline void ptdesc_pmd_pts_dec(struct ptdesc *ptdesc)
>  	atomic_dec(&ptdesc->pt_share_count);
>  }
>
> -static inline int ptdesc_pmd_pts_count(struct ptdesc *ptdesc)
> +static inline int ptdesc_pmd_pts_count(const struct ptdesc *const ptdesc)
>  {
>  	return atomic_read(&ptdesc->pt_share_count);
>  }
> @@ -660,7 +660,7 @@ static inline void set_page_private(struct page *page, unsigned long private)
>  	page->private = private;
>  }
>
> -static inline void *folio_get_private(struct folio *folio)
> +static inline void *folio_get_private(const struct folio *const folio)
>  {
>  	return folio->private;
>  }
> --
> 2.47.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ