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] [day] [month] [year] [list]
Message-ID: <a2468cc8-cdc1-0a03-6de1-6607bff4d0fa@linux.alibaba.com>
Date:   Fri, 3 Jan 2020 19:31:49 +0800
From:   Wen Yang <wenyang@...ux.alibaba.com>
To:     Justin Capella <justincapella@...il.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, xlpang@...ux.alibaba.com,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ftrace: avoid potential division by zero



On 2020/1/3 4:00 下午, Justin Capella wrote:
>> -               do_div(stddev, rec->counter * (rec->counter - 1) * 1000);
>>
>> +               stddev = div64_ul(stddev,
>> +                                 rec->counter * (rec->counter - 1) * 1000);
> 
> 
> Is a rec->counter > 1 assertion needed here?
> 

Hello, the above lines deal with this situation:

         if (rec->counter <= 1)
                 stddev = 0;
         else {


--
Regards,
Wen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ