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:   Fri, 10 Sep 2021 16:23:03 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
        daniel@...earbox.net, andrii@...nel.org
Subject: Re: [PATCH] treewide: Remove unnamed static initializations to 0

On Fri, Sep 10, 2021 at 03:52:07PM -0700, Kees Cook wrote:
> GCC 4.9 does not like having struct assignments to 0 when members may be
> compound types. For example, there are 186 instances of these kinds of
> errors:
> 
> drivers/virtio/virtio_vdpa.c:146:9: error: missing braces around initializer [-Werror=missing-braces ]
> drivers/cxl/core/regs.c:40:17: error: missing braces around initializer [-Werror=missing-braces]
> 
> Since "= { 0 }" and "= { }" have the same meaning ("incomplete
> initializer") they will both initialize the given variable to zero
> (modulo padding games).
> 
> After this change, I can almost build the "allmodconfig" target with
> GCC 4.9 again.
> 
> Signed-off-by: Kees Cook <keescook@...omium.org>

...

>  .../selftests/bpf/prog_tests/perf_branches.c  |   4 +-
>  .../selftests/bpf/prog_tests/sk_lookup.c      |  12 +-
>  .../selftests/bpf/prog_tests/sockmap_ktls.c   |   2 +-
>  .../selftests/bpf/prog_tests/sockmap_listen.c |   4 +-
>  .../selftests/bpf/progs/test_sk_assign.c      |   6 +-
>  .../selftests/bpf/progs/test_xdp_vlan.c       |   8 +-

Those have nothing to do with GCC. They are compiled with clang with -target bpf.
Did you check that bpf selftests still pass?
We've had issues with older clang generating different code with zero and non-zero
assignments and libbpf was confused.
It should all work now, but please run the tests.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ