Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp69263ybf; Wed, 26 Feb 2020 09:00:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzZkcr9nBKTdtDaocUwkXyaxC45zjmp1vDvbqmlUgtcWaSuyD83g4I7YmP7rERrLarEKTmR X-Received: by 2002:a05:6830:140f:: with SMTP id v15mr3886267otp.218.1582736408004; Wed, 26 Feb 2020 09:00:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582736407; cv=none; d=google.com; s=arc-20160816; b=OKd1RSBCVj4EPW7BmeKsxcUo+6GWtAdvUyNETzQ746W4VU1oLBpXeZy1dMrSZI/8bo KW/3feB4tWWRfyIeKN3QtnhIneZ2PdrhBmilMibtTEpCHAJE3vlQ0N6gyaZxXj2Y4gDM Ydb2EeawluD7NUC6dLnAi3kYV/9FIub6TNYZsrYsO7LKtXZWhJF2jkmxh2clnebUoOVx Uy2Pcnvvh48va7c0qu145CSPku5dv4Iiwj0s5RbkSNsEpMokwInht8+1kfnBIg+raa2S XhKZek+31fnqruY8wkfqI+8Thl5Y7gM+eZCnFzZix2mI/QExCumTs51Sor2SeSohkhLo Oz5A== 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=acWNB8yOida4e97Wx0Usr605xhbpZMtq/AiVglIlGX4=; b=b3FdAZ6hI1qWR1DVT86nEoFcbxLVtYaMrrAiHng0minCwimzO9vG+8f3PPrhfLhnNl zfDCL/oeiqu/2TCjXlzjZqwa4fjuHUf69Ocf5dB7ZOGlHAzWmfWccb18S18byJpMhlLo xo8tzbYKJMCGzjFcwA/+O8r8uNT3v1LoOe68fw/bZCvzNBrFGC2QCrjbD6XrEVqlzmak D+CEXi+JFKxycWGcLzBQ4NjDlK3rsiZzMlEfGNfqLGY2wv9PcCM3+aQAZokOre8qufKy kIb8hGX5SwiM4kjPsHKLjonJIWRkkoORX5eLh4nQdnjOXAYzoIAQtHk2t87kIxIOqmEC PYmA== 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 n11si43670otk.290.2020.02.26.08.59.55; Wed, 26 Feb 2020 09:00:07 -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 S1727854AbgBZQ7s (ORCPT + 99 others); Wed, 26 Feb 2020 11:59:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:36162 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727141AbgBZQ7s (ORCPT ); Wed, 26 Feb 2020 11:59:48 -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 9B872AE87; Wed, 26 Feb 2020 16:59:45 +0000 (UTC) From: Michal Rostecki To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next v4 0/5] Make probes which emit dmesg warnings optional Date: Wed, 26 Feb 2020 17:59:34 +0100 Message-Id: <20200226165941.6379-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. 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 -- 2.25.1