Skip to content

Make probes which emit dmesg warnings optional

Michal Rostecki bpf linux-kselftest lkml netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 2 repliesIn review
  2. v35 patches 7 repliesSuperseded
  3. v25 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches5 repliesSuperseded

Changes in v4 from the cover letter

- Use enum to check for helper functions.
- Make selftests compatible with older versions of Python 3.x than 3.7.

[0] https://github.com/cilium/cilium/issues/10048

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bpftool: Move out sections to separate functionstools/bpf/bpftool/feature.c+126 -930 replies
2/5bpftool: Make probes which emit dmesg warnings optionaltools/bpf/bpftool/feature.c+49 -210 replies
3/5bpftool: Update documentation of "bpftool feature" commandtools/bpf/bpftool/Documentation/bpftool-feature.rst+10 -90 replies
4/5bpftool: Update bash completion for "bpftool feature" commandtools/bpf/bpftool/bash-completion/bpftool+2 -10 replies
5/5selftests/bpf: Add test for "bpftool feature" commandtools/testing/selftests/.gitignore tools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/test_bpftool.py +1 more+189 -20 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchQuentin Monnet
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/5] Make probes which emit dmesg warnings optional

Feature probes in bpftool related to bpf_probe_write_user and bpf_trace_printk helpers emit dmesg warnings which might be confusing for people running bpftool on production environments. This patch series addresses that by filtering them out by default and introducing the new positional argument "full" which enables all available probes.

The main motivation behind those changes is ability the fact that some probes (for example those related to "trace" or "write_user" helpers) emit dmesg messages which might be confusing for people who are running on production environments. For details see the Cilium issue[0].

v1 -> v2:
- Do not expose regex filters to users, keep filtering logic internal, expose only the "full" option for including probes which emit dmesg warnings.

v2 -> v3:
- Do not use regex for filtering out probes, use function IDs directly.
- Fix bash completion - in v2 only "prefix" was proposed after "macros", "dev" and "kernel" were not.
- Rephrase the man page paragraph, highlight helper function names.
- Remove tests which parse the plain output of bpftool (except the header/macros test), focus on testing JSON output instead.
- Add test which compares the output with and without "full" option.

v3 -> v4:
- Use enum to check for helper functions.
- Make selftests compatible with older versions of Python 3.x than 3.7.

[0] https://github.com/cilium/cilium/issues/10048

Michal Rostecki (5):
bpftool: Move out sections to separate functions
bpftool: Make probes which emit dmesg warnings optional
bpftool: Update documentation of "bpftool feature" command
bpftool: Update bash completion for "bpftool feature" command selftests/bpf: Add test for "bpftool feature" command

 .../bpftool/Documentation/bpftool-feature.rst |  19 +-
 tools/bpf/bpftool/bash-completion/bpftool     |   3 +-
 tools/bpf/bpftool/feature.c                   | 283 +++++++++++-------
 tools/testing/selftests/.gitignore            |   5 +-
 tools/testing/selftests/bpf/Makefile          |   3 +-
 tools/testing/selftests/bpf/test_bpftool.py   | 178 +++++++++++
 tools/testing/selftests/bpf/test_bpftool.sh   |   5 +
 7 files changed, 373 insertions(+), 123 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/test_bpftool.py
 create mode 100755 tools/testing/selftests/bpf/test_bpftool.sh
Signature · 1 line
2.25.1