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: <11a5d391-3a13-4376-98f1-34b529d3c583@redhat.com>
Date: Wed, 27 Aug 2025 13:56:09 +0200
From: David Hildenbrand <david@...hat.com>
To: Max Kellermann <max.kellermann@...os.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, lorenzo.stoakes@...cle.com,
 ziy@...dia.com, baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com,
 npache@...hat.com, ryan.roberts@....com, dev.jain@....com,
 baohua@...nel.org, shikemeng@...weicloud.com, kasong@...cent.com,
 nphamcs@...il.com, bhe@...hat.com, chrisl@...nel.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] huge_mm.h: is_huge_zero_folio(NULL) should return
 false

On 27.08.25 12:13, Max Kellermann wrote:
> On Wed, Aug 27, 2025 at 11:36 AM David Hildenbrand <david@...hat.com> wrote:
>> Why should it be allowed to pass in garbage (folio == NULL) into a
>> function that operates on valid folios?
> 
> This patch isn't about the function parameter but about the global
> variable being NULL.
> (Don't mix up with my other patch.)

Huh?

"Calling is_huge_zero_folio(NULL) should not be legal - it makes no
sense, and a different (theoretical) implementation may dereference
the pointer."

And then

"But currently, lacking any explicit documentation, this
call is legal."

No. It isn't. It never was.

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ