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: <20250925010159.psdey3tir2wvlnoi@master>
Date: Thu, 25 Sep 2025 01:01:59 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
	Suren Baghdasaryan <surenb@...gle.com>,
	Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH v1] mm: convert folio_page() back to a macro

On Tue, Sep 23, 2025 at 04:00:58PM +0200, David Hildenbrand wrote:
>In commit 73b3294b1152 ("mm: simplify folio_page() and folio_page_idx()")
>we converted folio_page() into a static inline function. However
>briefly afterwards in commit a847b17009ec ("mm: constify highmem related
>functions for improved const-correctness") we had to add some nasty
>const-away casting to make the compiler happy when checking const
>correctness.
>
>So let's just convert it back to a simple macro so the compiler can
>check const correctness properly. There is the alternative of
>using a _Generic() similar to page_folio(), but there is not a lot of
>benefit compared to just using a simple macro.
>
>Cc: Andrew Morton <akpm@...ux-foundation.org>
>Cc: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
>Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>
>Cc: Vlastimil Babka <vbabka@...e.cz>
>Cc: Mike Rapoport <rppt@...nel.org>
>Cc: Suren Baghdasaryan <surenb@...gle.com>
>Cc: Michal Hocko <mhocko@...e.com>
>Signed-off-by: David Hildenbrand <david@...hat.com>

Reviewed-by: Wei Yang <richard.weiyang@...il.com>

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ