netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 00/11] Fix libbpf and selftest issues detected by ASAN
@ 2020-04-29  1:21 Andrii Nakryiko
  2020-04-29  1:21 ` [PATCH v2 bpf-next 01/11] selftests/bpf: ensure test flavors use correct skeletons Andrii Nakryiko
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Andrii Nakryiko @ 2020-04-29  1:21 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel; +Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

Add necessary infra to build selftests with ASAN (or any other sanitizer). Fix
a bunch of found memory leaks and other memory access issues.

v1->v2:
  - don't add ASAN flavor, but allow extra flags for build (Alexei);
  - fix few more found issues, which somehow were missed first time.

Andrii Nakryiko (11):
  selftests/bpf: ensure test flavors use correct skeletons
  selftests/bpf: add SAN_CFLAGS param to selftests build to allow
    sanitizers
  selftests/bpf: convert test_hashmap into test_progs test
  libbpf: fix memory leak and possible double-free in hashmap__clear
  selftests/bpf: fix memory leak in test selector
  selftests/bpf: fix memory leak in extract_build_id()
  selftests/bpf: fix invalid memory reads in core_relo selftest
  libbpf: fix huge memory leak in libbpf_find_vmlinux_btf_id()
  selftests/bpf: disable ASAN instrumentation for mmap()'ed memory read
  selftests/bpf: fix bpf_link leak in ns_current_pid_tgid selftest
  selftests/bpf: add runqslower binary to .gitignore

 tools/lib/bpf/hashmap.c                       |   7 +
 tools/lib/bpf/libbpf.c                        |   5 +-
 tools/testing/selftests/bpf/.gitignore        |   4 +-
 tools/testing/selftests/bpf/Makefile          |  11 +-
 .../selftests/bpf/prog_tests/core_reloc.c     |   2 +-
 .../{test_hashmap.c => prog_tests/hashmap.c}  | 280 +++++++++---------
 .../bpf/prog_tests/ns_current_pid_tgid.c      |   5 +-
 .../selftests/bpf/prog_tests/perf_buffer.c    |   5 +
 tools/testing/selftests/bpf/test_progs.c      |  21 +-
 9 files changed, 181 insertions(+), 159 deletions(-)
 rename tools/testing/selftests/bpf/{test_hashmap.c => prog_tests/hashmap.c} (53%)

-- 
2.24.1


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

end of thread, other threads:[~2020-04-29  2:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  1:21 [PATCH v2 bpf-next 00/11] Fix libbpf and selftest issues detected by ASAN Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 01/11] selftests/bpf: ensure test flavors use correct skeletons Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 02/11] selftests/bpf: add SAN_CFLAGS param to selftests build to allow sanitizers Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 03/11] selftests/bpf: convert test_hashmap into test_progs test Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 04/11] libbpf: fix memory leak and possible double-free in hashmap__clear Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 05/11] selftests/bpf: fix memory leak in test selector Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 06/11] selftests/bpf: fix memory leak in extract_build_id() Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 07/11] selftests/bpf: fix invalid memory reads in core_relo selftest Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 08/11] libbpf: fix huge memory leak in libbpf_find_vmlinux_btf_id() Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 09/11] selftests/bpf: disable ASAN instrumentation for mmap()'ed memory read Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 10/11] selftests/bpf: fix bpf_link leak in ns_current_pid_tgid selftest Andrii Nakryiko
2020-04-29  1:21 ` [PATCH v2 bpf-next 11/11] selftests/bpf: add runqslower binary to .gitignore Andrii Nakryiko
2020-04-29  2:56 ` [PATCH v2 bpf-next 00/11] Fix libbpf and selftest issues detected by ASAN Alexei Starovoitov

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).