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, 30 Jun 2020 14:05:53 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Dennis Dalessandro <dennis.dalessandro@...el.com>
Cc:     Mike Marciniszyn <mike.marciniszyn@...el.com>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] IB/hfi1: Add explicit cast OPA_MTU_8192 to 'enum ib_mtu'

On Wed, Jun 24, 2020 at 02:22:08PM -0400, Dennis Dalessandro wrote:
> On 6/22/2020 8:52 PM, Nathan Chancellor wrote:
> > Clang warns:
> > 
> > drivers/infiniband/hw/hfi1/qp.c:198:9: warning: implicit conversion from
> > enumeration type 'enum opa_mtu' to different enumeration type 'enum
> > ib_mtu' [-Wenum-conversion]
> >                  mtu = OPA_MTU_8192;
> >                      ~ ^~~~~~~~~~~~
> > 1 warning generated.
> > 
> > enum opa_mtu extends enum ib_mtu. There are typically two ways to deal
> > with this:
> > 
> > * Remove the expected types and just use 'int' for all parameters and
> >    types.
> > 
> > * Explicitly cast the enums between each other.
> > 
> > This driver chooses to do the later so do the same thing here.
> > 
> > Fixes: 6d72344cf6c4 ("IB/ipoib: Increase ipoib Datagram mode MTU's upper limit")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1062
> > Link: https://lore.kernel.org/linux-rdma/20200527040350.GA3118979@ubuntu-s3-xlarge-x86/
> > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> > ---
> 
> Acked-by: Dennis Dalessandro <dennis.dalessandro@...el.com>
> 

Thanks! Who should pick up this patch? This warning is in mainline now,
it would be nice if this could go via an -rc branch but if it is too
late for that, I understand.

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ