Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp92044ybf; Wed, 26 Feb 2020 09:22:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxkwWdEklOr8fXuR0TTDTvC+TOS+6yh8XvmvfA1AhyPTre87/AaP14VJrB1RaNsaiKRxZgr X-Received: by 2002:a9d:7305:: with SMTP id e5mr3827070otk.64.1582737762725; Wed, 26 Feb 2020 09:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582737762; cv=none; d=google.com; s=arc-20160816; b=EiV1nFPEjXKoINMvsL6LYM2zZmjKMU2+7j5WTwXjEOJJsVr7DCr+O4shdjzigIGuff tle7dLqwyQQ82CKRe2qQundDhLyGnNrQ3EQdG1+9xEZayQwTUC/cgMEfZ22aalB7tXd1 CkOKBB9OBajK4eFZ2ix4RuzhrRTbUJHwh/ugkx52hs0kJYPkA/HWTPOcLli4mSkJk+1J xAR+G4MLNLd9RU8+SbZvg8w5a8aK5z2zXD7n52DDdXvpg+2gL+amYSPGJRQ+AMhOIMep 1DiHzrvJJFReyC3JknazyDDwFP83zNL0qE3uxPCPacrAWBufbAPRjrsIiM9iUspKWO7N pfMQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=bTX6ADjL8vd+1qplRyyAzTsyyfpkgH9hYlmjz7+N2Q0=; b=P5H5aS3qHHzoYeNkC/y4sPT0ccV04mSjl9vwcxnUFzxycW8k3RKlDX4ZIyLGyzx9jU lOMhrjBparcNNx7uTP94qmxRwJ42H1FRnm+iSPyTzwff8SHhtJ/kGOEbpPK4y7Y84p95 P30gQeqmyURDbKzY+9QFOTFJ3pLpBj48qpL5v02Q2VweZ6oXNW3WIeohcyjW4HKPMy3X 33g6IR+gLivqtDx4X2sodAh6J0O7FupOSkRJiARJnCx+UqCRPeX+e7H2m+Pa1ImQorWQ YfXe7zWrtyYcTi1F4NcFwbYVWsWOSdLdVLXLVw929wAHvdN635dIhGxDQS0SWnzCF9/h yAQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent-com.20150623.gappssmtp.com header.s=20150623 header.b=PbDPEOi+; 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 f17si109465otq.96.2020.02.26.09.22.29; Wed, 26 Feb 2020 09:22:42 -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; dkim=pass header.i=@isovalent-com.20150623.gappssmtp.com header.s=20150623 header.b=PbDPEOi+; 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 S1726752AbgBZRWS (ORCPT + 99 others); Wed, 26 Feb 2020 12:22:18 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54322 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbgBZRWQ (ORCPT ); Wed, 26 Feb 2020 12:22:16 -0500 Received: by mail-wm1-f67.google.com with SMTP id z12so72583wmi.4 for ; Wed, 26 Feb 2020 09:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bTX6ADjL8vd+1qplRyyAzTsyyfpkgH9hYlmjz7+N2Q0=; b=PbDPEOi+fj86MtC89e+Ab3x5aotS6IyLV5IACbabN9wT7k1i+NDmdFkVEiKkZEVWiq svt1s7hrVlk7WnONe38fPZEyIX4+X/gmiN7BLWqoiRLdBJmtui1AaEeBvs/CyRe2PqI+ /dIE7j9fLxKG3TcHzGyrouk3FE2va6/P+wQF8wR8xq1SWuPn5Qvw7L/hAcPKNBncUIzv Gm9H5gu15hPIF1fv0VeAoue3GsLkCCam2NCQlP82I44waIzXmCDY9x8CkN4HE52PG5oP VfZxAJRjyfmW1YybszVGDjiwEo7zjU94JGvngRE6JfkFnAbiiNf8phyKIoH/IAMVdC6A Qcsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bTX6ADjL8vd+1qplRyyAzTsyyfpkgH9hYlmjz7+N2Q0=; b=dyR+81Y4wYHFO9+fGlRwaXAE+mmPkvJJa1pLAXoU1AU/AeLFl9lpmyl3QbTj/0sQgW mo7XHsaDvt2wx2OK7oKax1BWiVXqvMe+aWKF7e4Qaap3+fRCMEj/6w0phNGntMkdGS+L Jdv8sIC1pf4nuOjVX/g1qGdljGmiC9msWETTjtnsfBXzVWXr3NSxlTUPr6k/yOkNc4wL QSIcXrdGebAPb7QAdNeZH5XIOGAcbBXJIBnXgr8wmB5Torh13OIFumAh7EBwvwP7wK2j RdXpLycPTTNIgndkbLdi7KzK48WMES9SBAkVbIJtE6sMWtXr5SxpHULyKAlmkrbl0mJm uLGA== X-Gm-Message-State: APjAAAVJZEcaiPqippRtLZFVNcwHiwPa6oFWLsOpaUQNrsbYPkVvkb71 bsjx4hPMgV0PzEwFNjLcDVsSJw== X-Received: by 2002:a7b:c935:: with SMTP id h21mr6401277wml.173.1582737733834; Wed, 26 Feb 2020 09:22:13 -0800 (PST) Received: from [192.168.1.10] ([194.35.116.65]) by smtp.gmail.com with ESMTPSA id u62sm3830555wmu.17.2020.02.26.09.22.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Feb 2020 09:22:13 -0800 (PST) Subject: Re: [PATCH bpf-next v4 0/5] Make probes which emit dmesg warnings optional To: Michal Rostecki , 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 References: <20200226165941.6379-1-mrostecki@opensuse.org> From: Quentin Monnet Message-ID: Date: Wed, 26 Feb 2020 17:22:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200226165941.6379-1-mrostecki@opensuse.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020-02-26 17:59 UTC+0100 ~ Michal Rostecki > 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 > Reviewed-by: Quentin Monnet (Please keep tags between versions.) Your change looks good. The tests in patch 5 still pass with Python 3.7.5 (but I have not tried to run with an older version of Python). Quentin