linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/5] bpftool: Make probes which emit dmesg warnings optional
@ 2020-02-25 19:44 Michal Rostecki
  2020-02-25 19:44 ` [PATCH bpf-next v3 1/5] bpftool: Move out sections to separate functions Michal Rostecki
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Michal Rostecki @ 2020-02-25 19:44 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, Quentin Monnet, Jakub Kicinski,
	netdev, linux-kernel, Shuah Khan, linux-kselftest

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.

[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   | 179 +++++++++++
 tools/testing/selftests/bpf/test_bpftool.sh   |   5 +
 7 files changed, 374 insertions(+), 123 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/test_bpftool.py
 create mode 100755 tools/testing/selftests/bpf/test_bpftool.sh

-- 
2.25.1


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

end of thread, other threads:[~2020-02-26 15:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 19:44 [PATCH bpf-next v3 0/5] bpftool: Make probes which emit dmesg warnings optional Michal Rostecki
2020-02-25 19:44 ` [PATCH bpf-next v3 1/5] bpftool: Move out sections to separate functions Michal Rostecki
2020-02-25 19:44 ` [PATCH bpf-next v3 2/5] bpftool: Make probes which emit dmesg warnings optional Michal Rostecki
2020-02-26 15:35   ` Daniel Borkmann
2020-02-25 19:44 ` [PATCH bpf-next v3 3/5] bpftool: Update documentation of "bpftool feature" command Michal Rostecki
2020-02-25 19:44 ` [PATCH bpf-next v3 4/5] bpftool: Update bash completion for " Michal Rostecki
2020-02-25 19:44 ` [PATCH bpf-next v3 5/5] selftests/bpf: Add test " Michal Rostecki
2020-02-26 15:34   ` Daniel Borkmann
2020-02-26 15:42     ` Michal Rostecki
2020-02-26 15:43     ` Quentin Monnet
2020-02-26 11:17 ` [PATCH bpf-next v3 0/5] bpftool: Make probes which emit dmesg warnings optional Quentin Monnet
2020-02-26 12:17   ` Michal Rostecki
2020-02-26 12:33     ` Quentin Monnet

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