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] [day] [month] [year] [list]
Message-ID: <20190116181326.gwgva7niriynxhyw@kafai-mbp.dhcp.thefacebook.com>
Date:   Wed, 16 Jan 2019 18:13:27 +0000
From:   Martin Lau <kafai@...com>
To:     Peter Oskolkov <posk@...gle.com>
CC:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Peter Oskolkov <posk.devel@...il.com>
Subject: Re: [PATCH bpf-next] bpf: fix a (false) compiler warning

On Wed, Jan 16, 2019 at 08:44:32AM -0800, Peter Oskolkov wrote:
> An older GCC compiler complains:
> 
> kernel/bpf/verifier.c: In function 'bpf_check':
> kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized
>       in this function [-Werror=maybe-uninitialized]
>    } else if (krecord[i].insn_offset <= prev_offset) {
>              ^
> kernel/bpf/verifier.c:4***:38: note: 'prev_offset' was declared here
>   u32 i, nfuncs, urec_size, min_size, prev_offset;
> 
> Although the comiler is wrong here, the patch makes sure
s/comiler/compiler/

> that prev_offset is always initialized, just to silence the warning.
> 
> Signed-off-by: Peter Oskolkov <posk@...gle.com>
Acked-by: Martin KaFai Lau <kafai@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ