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]
Date:   Tue, 6 Sep 2022 08:24:16 +0800
From:   "Huang, Shaoqin" <shaoqin.huang@...el.com>
To:     "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "pasha.tatashin@...een.com" <pasha.tatashin@...een.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: Check writable zero page in page table check



On 9/6/2022 2:50 AM, Edgecombe, Rick P wrote:
> On Sat, 2022-09-03 at 10:13 +0800, Huang, Shaoqin wrote:
>>> +     BUG_ON(is_zero_pfn(pfn) && rw);
>>> +
>>
>> Why we need use BUG_ON() here? Based on [1], we should avoid to use
>> the
>> BUG_ON() due to it will panic the machine.
>>
>> [1]:
>> https://lore.kernel.org/lkml/20220824163100.224449-1-david@redhat.com/
> 
> Yea, you are probably right. All the rest of this checker uses BUG_ON()
> though. Maybe they should all be something else? Just felt weird to
> have this be the only check that is different.
> 
> I don't have any objections to changing it to WARN_ON(). Should I
> switch the rest of the checks here while I'm at it?

Yes. I think in most situation, WARN_ON() or WARN_ON_ONCE() is ok.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ