Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp105974ybf; Wed, 26 Feb 2020 09:37:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwkrpDHLlceAOjoPDbmQUj07hW9wv5GREk1HWTTmzsdSc2Dl+5+L71iU9NcE6bhiAy2CORU X-Received: by 2002:a9d:7a96:: with SMTP id l22mr4003435otn.217.1582738660595; Wed, 26 Feb 2020 09:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582738660; cv=none; d=google.com; s=arc-20160816; b=OPhtoN0jHIoxXuRcVArRg8LTtS4YYACyrhASyy1eje/KRgH2Agqdo7y4kJCIfb0hGN nhDrs16+ppcx4wma1SnssJMb+i+pHhD7uKYkuDkAV7FOmA5akwqJoU4nkMQrs7/qtfbw gJ86Z5Wul7sHIJXGpcvIpBryg7xJhGgDdIJIvOfnzfZ9aLdewTDHghvKg65M/3aVRHhG csfDzRsXSWV8p/YwjINscbeVb1Yzw3Q60qAdVMl3PrnN2H6RlHyEbCefYBMzguijHKyh xVPUwym7Wmb5Nr+Zy6U4YZXfPVsuVEnsTDSuOZmFv4ZNLjEFNcMiOUTWQ7l8ire8wykC Tidw== 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; bh=85r3mYUolWvoRr85hMcIhp1MiKBnDR9P3vobgnpd+qk=; b=pv7ACeegk4aRpq+n8pCbP3kiKsN98V9NM/E39cLsDvRxVb+9nYEvbwcxz3w9sQDmlF YWY+yq4Dsek1sCX6nkFMCCryz3JlKb0Y0gx8ZVwJIDGAqp+X0iF8if02smkytGWw5Ukm +MJO7kDAZoMLOiqxRNVlOpE1WIWCwyr6FLWbG1IuvSPEWM4PdjjHtH9L51x3QysdhVbF gVL3onZPuGrfDkbmezO+Tk9MHO4SBjYWKRjHG1I5ohvQH/tqwKpqnsdbaNUcwLIenQTN SYeFhgK9E2W/9WmmD7eHKv+bh5qjQNLswVVc1q6HyTLQuG6ktRlxh0rW9LW3+7bHUet3 58LQ== 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 e6si98377otq.217.2020.02.26.09.37.19; Wed, 26 Feb 2020 09:37:40 -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 S1726940AbgBZRhF (ORCPT + 99 others); Wed, 26 Feb 2020 12:37:05 -0500 Received: from www62.your-server.de ([213.133.104.62]:42022 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgBZRhF (ORCPT ); Wed, 26 Feb 2020 12:37:05 -0500 Received: from sslproxy02.your-server.de ([78.47.166.47]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1j70c8-0002db-0I; Wed, 26 Feb 2020 18:36:52 +0100 Received: from [2001:1620:665:0:5795:5b0a:e5d5:5944] (helo=linux-3.fritz.box) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j70c7-000Is6-Fc; Wed, 26 Feb 2020 18:36:51 +0100 Subject: Re: [PATCH bpf-next v4 0/5] Make probes which emit dmesg warnings optional To: Quentin Monnet , Michal Rostecki , bpf@vger.kernel.org Cc: Alexei Starovoitov , 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: Daniel Borkmann Message-ID: <03558a25-d07c-d4df-6840-4a171f18d893@iogearbox.net> Date: Wed, 26 Feb 2020 18:36:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25734/Tue Feb 25 15:06:17 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/26/20 6:22 PM, Quentin Monnet wrote: > 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). Looks better now ... # ./test_bpftool.sh test_feature_dev_json (test_bpftool.TestBpftool) ... ok test_feature_kernel (test_bpftool.TestBpftool) ... ok test_feature_kernel_full (test_bpftool.TestBpftool) ... ok test_feature_kernel_full_vs_not_full (test_bpftool.TestBpftool) ... ok test_feature_macros (test_bpftool.TestBpftool) ... ok ---------------------------------------------------------------------- Ran 5 tests in 0.253s OK ... applied, thanks!