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: <87y3p8b9iv.fsf@concordia.ellerman.id.au>
Date:   Thu, 21 Sep 2017 21:01:28 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     cody@...yps.com
Cc:     David Binderman <dcb314@...mail.com>,
        "benh\@kernel.crashing.org" <benh@...nel.crashing.org>,
        "paulus\@samba.org" <paulus@...ba.org>,
        "linuxppc-dev\@lists.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: linux-4.14-rc1/arch/powerpc/perf/hv-24x7.c:541: bad condition ?

[ + Cody in case he's still interested]

Michael Ellerman <mpe@...erman.id.au> writes:
> David Binderman <dcb314@...mail.com> writes:
>
>> Hello there,
>>
>> linux-4.14-rc1/arch/powerpc/perf/hv-24x7.c:543]: (warning) Identical condition 's1<s2', second condition is always false
>>
>> Source code is
>>
>>     if (s1 < s2)
>>         return 1;
>>     if (s2 > s1)
>>         return -1;
>>
>> Suggest code rework.
>
> Um thanks.
>
> It's trying to implement a sort comparison returning -1, 0, 1.
>
> So it's pretty obviously wrong, but also harmless AFAICS, because it's
> just an optimisation before doing a full comparison using memcmp().
>
> So yeah we should fix it, but not an actual bug AFAICS.
>
> cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ