netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <andrii.nakryiko@gmail.com>, <kernel-team@fb.com>, <ast@fb.com>,
	<acme@kernel.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>, <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH bpf-next 0/5] btf_dedup algorithm and test fixes
Date: Wed, 27 Feb 2019 14:46:36 -0800	[thread overview]
Message-ID: <20190227224642.1069138-1-andriin@fb.com> (raw)

This patchset fixes a bug in btf_dedup() algorithm, which under specific hash
collision causes infinite loop. It also exposes ability to tune BTF
deduplication table size, with double purpose of allowing applications to
adjust size according to the size of BTF data, as well as allowing a simple way
to force hash collisions by setting table size to 1.

- Patch #1 fixes bug in btf_dedup testing code that's checking strings
- Patch #2 fixes pointer arg formatting in btf.h
- Patch #3 adds option to specify custom dedup table size
- Patch #4 fixes aforementioned bug in btf_dedup
- Patch #5 adds test that validates the fix

Andrii Nakryiko (5):
  selftests/bpf: fix btf_dedup testing code
  libbpf: fix formatting for btf_ext__get_raw_data
  btf: allow to customize dedup hash table size
  btf: fix bug with resolving STRUCT/UNION into corresponding FWD
  selftests/bpf: add btf_dedup test of FWD/STRUCT resolution

 tools/lib/bpf/btf.c                    | 49 ++++++++++++++++----------
 tools/lib/bpf/btf.h                    |  3 +-
 tools/testing/selftests/bpf/.gitignore |  1 +
 tools/testing/selftests/bpf/test_btf.c | 49 ++++++++++++++++++++++++--
 4 files changed, 81 insertions(+), 21 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-02-27 22:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 22:46 Andrii Nakryiko [this message]
2019-02-27 22:46 ` [PATCH bpf-next 1/5] selftests/bpf: fix btf_dedup testing code Andrii Nakryiko
2019-02-28 18:17   ` Song Liu
2019-02-28 18:19   ` Yonghong Song
2019-02-28 18:52   ` Arnaldo Carvalho de Melo
2019-02-28 19:19     ` Andrii Nakryiko
2019-02-27 22:46 ` [PATCH bpf-next 2/5] libbpf: fix formatting for btf_ext__get_raw_data Andrii Nakryiko
2019-02-28 18:17   ` Song Liu
2019-02-28 18:53   ` Arnaldo Carvalho de Melo
2019-02-28 19:20     ` Andrii Nakryiko
2019-02-27 22:46 ` [PATCH bpf-next 3/5] btf: allow to customize dedup hash table size Andrii Nakryiko
2019-02-28 18:27   ` Song Liu
2019-02-28 18:51     ` Andrii Nakryiko
2019-02-28 19:02       ` Song Liu
2019-02-28 19:40         ` Andrii Nakryiko
2019-02-28 19:56           ` Song Liu
2019-02-28 18:57   ` Arnaldo Carvalho de Melo
2019-02-28 20:08     ` Andrii Nakryiko
2019-02-27 22:46 ` [PATCH bpf-next 4/5] btf: fix bug with resolving STRUCT/UNION into corresponding FWD Andrii Nakryiko
2019-02-28 18:18   ` Yonghong Song
2019-02-28 19:07     ` Andrii Nakryiko
2019-02-28 19:41       ` Yonghong Song
2019-02-28 20:26         ` Andrii Nakryiko
2019-02-28 18:29   ` Song Liu
2019-02-27 22:46 ` [PATCH bpf-next 5/5] selftests/bpf: add btf_dedup test of FWD/STRUCT resolution Andrii Nakryiko
2019-02-28 18:29   ` Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190227224642.1069138-1-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).