Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4028499ybv; Tue, 25 Feb 2020 11:45:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwfPM1V5foFilwMdA0sJSL/Cb3+S9/Z1bFd2s9M936iW5rEQH7zMVuavA7YTrLZfcQHXOQI X-Received: by 2002:a9d:53c2:: with SMTP id i2mr155880oth.43.1582659915926; Tue, 25 Feb 2020 11:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582659915; cv=none; d=google.com; s=arc-20160816; b=1Db1ICpm2UEMerS+bO/8M8xSp+1bJf6cqboRfpfMEaLSHhpT0oZouMOGDQgcCuhvfC bl4odeJZ8VfrTqKdlURqnS+ekM75XOquUws3JK4XUdV6fldD9xENDBuu6Mho/2M4wSPC oXvgDjYLnrDipnKWICWxS+o89mC0ZjuK/7UIx2MyPIhAahC+QVbsRC/xUVEUhKQFle+o z3aCfcSC5E/N4FwLDoUOv6Vq1OdiUmgQlr83rGbI05PSz40glBUPH6/NMe3Bli3W9/m/ OIrwXCnppfmnRYqeyaehLqE73b+iepM/lvwGwMHESpl89ShzO7/rZ91z63G7Pws43pt9 6TlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Hu3nUDhRXA6D0LXDezBUDjjUpAuQGwoaSEcIawgX0Y0=; b=supkxl3spoMVJwJag1A8mMPVuyMzQbqwtXO8ZC2FG43v7yEasPZHZm2KWHRDprWnip 65P8+LtPLMHO6Zsd2DKkcErBkLWM91NEnz/urrmaUScZp5q7Q3HuTnBlhi4UfkDog/1m iyDULpM6UQdbbqniUe1U8HD7+/pir3wvu44shhQdD7PG+fc1ecDj6+h12dNNSdeWQ9ZF /dGDFSVzEqXoCB3l8rfCHYTt0yKssfNPRgUUtjp/BhQtXuCw1Nsi0dKEOwQ4s9Keza3L zYPt5/h6mLZAzdfQqtshy5/9z8OgelutinjR8SFr8mPqc7zCaCI2sRCkc39ZPbgVisCD wyNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k66si62524oih.200.2020.02.25.11.45.03; Tue, 25 Feb 2020 11:45:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730864AbgBYTo4 (ORCPT + 99 others); Tue, 25 Feb 2020 14:44:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:55560 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728051AbgBYToz (ORCPT ); Tue, 25 Feb 2020 14:44:55 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D0466AB7F; Tue, 25 Feb 2020 19:44:52 +0000 (UTC) From: Michal Rostecki To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next v3 0/5] bpftool: Make probes which emit dmesg warnings optional Date: Tue, 25 Feb 2020 20:44:38 +0100 Message-Id: <20200225194446.20651-1-mrostecki@opensuse.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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