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: <87zh3g3clq.fsf@mpe.ellerman.id.au>
Date:   Tue, 17 Nov 2020 14:07:29 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Andrew Donnellan <ajd@...ux.ibm.com>, xiakaixu1987@...il.com,
        fbarrat@...ux.ibm.com, benh@...nel.crashing.org, paulus@...ba.org
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        Kaixu Xia <kaixuxia@...cent.com>
Subject: Re: [PATCH] powerpc/powernv/sriov: fix unsigned int win compared to less than zero

Andrew Donnellan <ajd@...ux.ibm.com> writes:

> On 10/11/20 10:19 pm, xiakaixu1987@...il.com wrote:
>> From: Kaixu Xia <kaixuxia@...cent.com>
>> 
>> Fix coccicheck warning:
>> 
>> ./arch/powerpc/platforms/powernv/pci-sriov.c:443:7-10: WARNING: Unsigned expression compared with zero: win < 0
>> ./arch/powerpc/platforms/powernv/pci-sriov.c:462:7-10: WARNING: Unsigned expression compared with zero: win < 0
>> 
>> Reported-by: Tosk Robot <tencent_os_robot@...cent.com>
>> Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>
>
> This seems like the right fix, the value assigned to win can indeed be 
> -1 so it should be signed. Thanks for sending the patch.
>
> Reviewed-by: Andrew Donnellan <ajd@...ux.ibm.com>

I'll add:

  Fixes: 39efc03e3ee8 ("powerpc/powernv/sriov: Move M64 BAR allocation into a helper")

Which I think is the culprit as it changed:

  if (win >= phb->ioda.m64_bar_idx + 1)

to:

  if (win < 0)


cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ