[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH bpf v2] libbpf: fix passing uninitialized bytes to setsockopt
On Wed, Oct 9, 2019 at 9:49 AM Ilya Maximets <> wrote:
> 'struct xdp_umem_reg' has 4 bytes of padding at the end that makes
> valgrind complain about passing uninitialized stack memory to the
> syscall:
> Syscall param socketcall.setsockopt() points to uninitialised byte(s)
> at 0x4E7AB7E: setsockopt (in /usr/lib64/
> by 0x4BDE035: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:172)
> Uninitialised value was created by a stack allocation
> at 0x4BDDEBA: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:140)
> Padding bytes appeared after introducing of a new 'flags' field.
> memset() is required to clear them.
> Fixes: 10d30e301732 ("libbpf: add flags to umem config")
> Signed-off-by: Ilya Maximets <>

Applied. Thanks

 \ /
  Last update: 2019-10-10 00:51    [W:0.024 / U:10.204 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site