diff options
author | Ilya Maximets <[email protected]> | 2019-10-09 18:49:29 +0200 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2019-10-09 15:45:37 -0700 |
commit | 25bfef430e960e695403b5d9c8dcc11b9f5d62be (patch) | |
tree | 8b4349590cbbdc4f2c6444d6b92c5437fc8b6b07 /tools/perf/scripts/python/check-perf-trace.py | |
parent | f1177102454e1832b9814051f2b071a8285581ea (diff) |
libbpf: Fix passing uninitialized bytes to setsockopt
'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/libc-2.29.so)
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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions