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: <aPQxN7-FeFB6vTuv@casper.infradead.org>
Date: Sun, 19 Oct 2025 01:30:47 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Mike Rapoport <rppt@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Brendan Jackman <jackmanb@...gle.com>,
	David Hildenbrand <david@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Julia Lawall <Julia.Lawall@...ia.fr>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Michal Hocko <mhocko@...e.com>,
	Suren Baghdasaryan <surenb@...gle.com>,
	Vlastimil Babka <vbabka@...e.cz>, Zi Yan <ziy@...dia.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 0/3] mm: treewide: make get_free_pages() and return void *

On Sat, Oct 18, 2025 at 12:29:59PM +0300, Mike Rapoport wrote:
> Vast majority of allocations that use get_free_pages() and its derivatives
> cast the returned unsigned long to a pointer and then cast it back to
> unsigned long when freeing the memory.
> 
> These castings are useless and only obfuscate the code.
> 
> Make get_free_pages() and friends return 'void *' and free_pages() accept
> 'void *' as its address parameter.

No.  Linus has rejected this change before.  I can't find it now, it was
a long time ago.  Most of them shouldn't be using get_free_pages() at
all, they should be using kmalloc().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ