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, 10 Sep 2019 14:10:13 +0300
From:   "Hawa, Hanna" <hhhawa@...zon.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     Robert Richter <rrichter@...vell.com>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "james.morse@....com" <james.morse@....com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dwmw@...zon.co.uk" <dwmw@...zon.co.uk>,
        "benh@...zon.com" <benh@...zon.com>,
        "ronenk@...zon.com" <ronenk@...zon.com>,
        "talel@...zon.com" <talel@...zon.com>,
        "jonnyc@...zon.com" <jonnyc@...zon.com>,
        "hanochu@...zon.com" <hanochu@...zon.com>
Subject: Re: [PATCH 1/1] edac: Add an API for edac device to report for
 multiple errors

Hi

On 9/8/2019 11:35 AM, Borislav Petkov wrote:
> On Sun, Sep 08, 2019 at 10:16:02AM +0200, Borislav Petkov wrote:
>> On Sun, Sep 08, 2019 at 10:58:31AM +0300, Hawa, Hanna wrote:
>>>> Better use WARN_ON_ONCE() to avoid flooding.
>>>
>>> In case of two drivers using this function with wrong error count, only the
>>> first WARN_ON_ONCE will catch in this case, and other will miss other wrong
>>> usage of other edac device drivers.
>>
>> The idea is to catch any driver using a 0 error count and fix it, not to
>> flood dmesg. You want _ONCE.
> 
> ... and you want to return early too, i.e.,
> 
> 	if (WARN_ON_ONCE(!error_count))
> 		return;
> 
> Frankly, I'd even remove all the warning functionality and simply do
> 
> 	if (!error_count)
> 		return;

I'll keep it simple as you suggest and remove the warning functionality.

> 
> but let's see how much it screams first.
> 

Thanks,
Hanna

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ