bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/13] Fix sanitizer-reported libbpf and selftest issues
@ 2021-11-24  0:23 Andrii Nakryiko
  2021-11-24  0:23 ` [PATCH bpf-next 01/13] tools/resolve_btf_ids: close ELF file on error Andrii Nakryiko
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Andrii Nakryiko @ 2021-11-24  0:23 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: andrii, kernel-team

After doing another run with ASAN, LSAN, and UBSAN, they turned up a bunch of
new issues not noticed before. Fix all of them in preparation for sanitized
test_progs runs in BPF CI in the near future.

Andrii Nakryiko (13):
  tools/resolve_btf_ids: close ELF file on error
  libbpf: fix potential misaligned memory access in btf_ext__new()
  libbpf: prevent UBSan from complaining about integer overflow
  libbpf: don't call libc APIs with NULL pointers
  libbpf: fix glob_syms memory leak in bpf_linker
  libbpf: fix using invalidated memory in bpf_linker
  selftests/bpf: fix UBSan complaint about signed __int128 overflow
  selftests/bpf: fix possible NULL passed to memcpy() with zero size
  selftests/bpf: prevent misaligned memory access in get_stack_raw_tp
    test
  selftests/bpf: fix misaligned memory access in queue_stack_map test
  selftests/bpf: prevent out-of-bounds stack access in test_bpffs
  selftests/bpf: fix misaligned memory accesses in xdp_bonding test
  selftests/bpf: fix misaligned accesses in xdp and xdp_bpf2bpf tests

 tools/bpf/resolve_btfids/main.c               |  5 +--
 tools/lib/bpf/btf.c                           | 11 +++---
 tools/lib/bpf/btf.h                           |  2 +-
 tools/lib/bpf/libbpf.c                        | 10 ++++--
 tools/lib/bpf/linker.c                        |  6 +++-
 .../selftests/bpf/prog_tests/btf_dump.c       |  2 +-
 .../selftests/bpf/prog_tests/core_reloc.c     |  3 +-
 .../bpf/prog_tests/get_stack_raw_tp.c         | 14 +++++---
 .../bpf/prog_tests/queue_stack_map.c          | 12 ++++---
 .../selftests/bpf/prog_tests/test_bpffs.c     |  4 ++-
 tools/testing/selftests/bpf/prog_tests/xdp.c  | 11 +++---
 .../selftests/bpf/prog_tests/xdp_bonding.c    | 36 ++++++++++---------
 .../selftests/bpf/prog_tests/xdp_bpf2bpf.c    |  6 ++--
 13 files changed, 74 insertions(+), 48 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-11-26  1:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  0:23 [PATCH bpf-next 00/13] Fix sanitizer-reported libbpf and selftest issues Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 01/13] tools/resolve_btf_ids: close ELF file on error Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 02/13] libbpf: fix potential misaligned memory access in btf_ext__new() Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 03/13] libbpf: prevent UBSan from complaining about integer overflow Andrii Nakryiko
2021-11-25 22:21   ` Daniel Borkmann
2021-11-25 23:19     ` Daniel Borkmann
2021-11-26  1:23       ` Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 04/13] libbpf: don't call libc APIs with NULL pointers Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 05/13] libbpf: fix glob_syms memory leak in bpf_linker Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 06/13] libbpf: fix using invalidated memory " Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 07/13] selftests/bpf: fix UBSan complaint about signed __int128 overflow Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 08/13] selftests/bpf: fix possible NULL passed to memcpy() with zero size Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 09/13] selftests/bpf: prevent misaligned memory access in get_stack_raw_tp test Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 10/13] selftests/bpf: fix misaligned memory access in queue_stack_map test Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 11/13] selftests/bpf: prevent out-of-bounds stack access in test_bpffs Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 12/13] selftests/bpf: fix misaligned memory accesses in xdp_bonding test Andrii Nakryiko
2021-11-24  0:23 ` [PATCH bpf-next 13/13] selftests/bpf: fix misaligned accesses in xdp and xdp_bpf2bpf tests Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).