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:   Mon, 31 Aug 2020 16:59:28 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Tony Ambardar <tony.ambardar@...il.com>,
        Alexei Starovoitov <ast@...nel.org>
Cc:     Andrii Nakryiko <andriin@...com>, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH bpf v1] libbpf: fix build failure from uninitialized
 variable warning

On 8/31/20 2:03 AM, Tony Ambardar wrote:
> While compiling libbpf, some GCC versions (at least 8.4.0) have difficulty
> determining control flow and a emit warning for potentially uninitialized
> usage of 'map', which results in a build error if using "-Werror":
> 
> In file included from libbpf.c:56:
> libbpf.c: In function '__bpf_object__open':
> libbpf_internal.h:59:2: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \
>    ^~~~~~~~~~~~
> libbpf.c:5032:18: note: 'map' was declared here
>    struct bpf_map *map, *targ_map;
>                    ^~~
> 
> The warning/error is false based on code inspection, so silence it with a
> NULL initialization.
> 
> Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support")
> Ref: 063e68813391 ("libbpf: Fix false uninitialized variable warning")
> 
> Signed-off-by: Tony Ambardar <Tony.Ambardar@...il.com>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ