summaryrefslogtreecommitdiffstats
path: root/kernel/iomem.c
diff options
context:
space:
mode:
authorIlya Maximets2019-07-23 14:08:10 +0200
committerAlexei Starovoitov2019-07-24 00:14:35 +0200
commitdecb705e01a5d325c9876b9674043cde4b54f0db (patch)
treedfe665d20a2f6df6c47403f95faa527a771c656d /kernel/iomem.c
parentMerge branch 'fix-gso_segs' (diff)
downloadkernel-qcow2-linux-decb705e01a5d325c9876b9674043cde4b54f0db.tar.gz
kernel-qcow2-linux-decb705e01a5d325c9876b9674043cde4b54f0db.tar.xz
kernel-qcow2-linux-decb705e01a5d325c9876b9674043cde4b54f0db.zip
libbpf: fix using uninitialized ioctl results
'channels.max_combined' initialized only on ioctl success and errno is only valid on ioctl failure. The code doesn't produce any runtime issues, but makes memory sanitizers angry: Conditional jump or move depends on uninitialised value(s) at 0x55C056F: xsk_get_max_queues (xsk.c:336) by 0x55C05B2: xsk_create_bpf_maps (xsk.c:354) by 0x55C089F: xsk_setup_xdp_prog (xsk.c:447) by 0x55C0E57: xsk_socket__create (xsk.c:601) Uninitialised value was created by a stack allocation at 0x55C04CD: xsk_get_max_queues (xsk.c:318) Additionally fixed warning on uninitialized bytes in ioctl arguments: Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s) at 0x648D45B: ioctl (in /usr/lib64/libc-2.28.so) by 0x55C0546: xsk_get_max_queues (xsk.c:330) by 0x55C05B2: xsk_create_bpf_maps (xsk.c:354) by 0x55C089F: xsk_setup_xdp_prog (xsk.c:447) by 0x55C0E57: xsk_socket__create (xsk.c:601) Address 0x1ffefff378 is on thread 1's stack in frame #1, created by xsk_get_max_queues (xsk.c:318) Uninitialised value was created by a stack allocation at 0x55C04CD: xsk_get_max_queues (xsk.c:318) CC: Magnus Karlsson <magnus.karlsson@intel.com> Fixes: 1cad07884239 ("libbpf: add support for using AF_XDP sockets") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/iomem.c')
0 files changed, 0 insertions, 0 deletions