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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Nov 2018 18:33:40 -0800
From:   Joe Perches <joe@...ches.com>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Stefano Brivio <sbrivio@...hat.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Sabrina Dubroca <sd@...asysnail.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] geneve: Use empty braces for addr6
 initializer

On Fri, 2018-11-16 at 08:37 -0700, Nathan Chancellor wrote:
> On Fri, Nov 16, 2018 at 03:04:32PM +0100, Stefano Brivio wrote:
> > On Mon, 12 Nov 2018 23:11:47 -0700
> > Nathan Chancellor <natechancellor@...il.com> wrote:
> > 
> > > Clang warns:
> > > 
> > > drivers/net/geneve.c:428:29: error: suggest braces around initialization
> > > of subobject [-Werror,-Wmissing-braces]
> > >                 struct in6_addr addr6 = { 0 };
> > >                                           ^
> > >                                           {}
> > > 
> > > Most initializations of structs in the kernel seem to use this format.
[]
> > So { { { 0 } } } seems to be the safest option. We could go with static
> > but it looks even uglier to me.
> > 
> > Joe, suggestions?

If this is really an issue, I don't know why the other uses
haven't been reported.  Perhaps change the rest of them too?

$ git grep -P "struct\s+in6_addr\s+\w+\s*=\s*{\s*}"
include/net/ip6_fib.h:          struct in6_addr in6_zero = {};
include/trace/events/fib6.h:                    struct in6_addr in6_zero = {};
net/6lowpan/iphc.c:     struct in6_addr network_pfx = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};
net/6lowpan/iphc.c:     struct in6_addr tmp = {};



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ