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: <e5783c3d-7eeb-41d9-9fe7-730155f9bf17@redhat.com>
Date: Wed, 27 Aug 2025 11:36:43 +0200
From: David Hildenbrand <david@...hat.com>
To: Max Kellermann <max.kellermann@...os.com>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: 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 06:39, Max Kellermann wrote:
> On Wed, Aug 27, 2025 at 3:55 AM Andrew Morton <akpm@...ux-foundation.org> wrote:
>> Isn't it a bug to call is_huge_zero_folio() before the huge_zero_folio
>> has been created?
> 
> I have no idea, but folios_put_refs() calls it and I don't see why it
> shouldn't be allowed to do that. What else should folios_put_refs()
> do?

Why should it be allowed to pass in garbage (folio == NULL) into a 
function that operates on valid folios?

> 
> (Thanks Zi Yan, I'll send v2 with your suggestions.)

No, use a VM_WARN_ON_ONCE().

-- 
Cheers

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ