Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4857470ybv; Wed, 26 Feb 2020 04:17:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzNeXsiaEyS3xFcfoEzPmbqk5LGDHY1bA0GcNvhT0AOiemvRuQInHOYyQsjtXsLeUfLgU06 X-Received: by 2002:a9d:5e82:: with SMTP id f2mr2650456otl.240.1582719456286; Wed, 26 Feb 2020 04:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582719456; cv=none; d=google.com; s=arc-20160816; b=rq0jcq1LqU4ORz+E9R0MxbOYbCrsa46d0ru2e8JRvGg/W69tdTPyDrZ4XpQQ/AR1bv 0/OqLt/MJtpd+Axfrt3gCqWcDlhTyHN+9EKRdzlsfNheJ8pLwpZ3uSQVn1ExfRL5a471 SdUkBT7DA969E7RJkFymjzWxOoJzrS5KDL2fQAyT7wltpPfwosx1+/C+7EUAyArALYEq k7Wu1TW+KgbqeHv930zm+Bs5bOi2Ib9v/gylMIlqx69kz6xNj832thuItgV/2qzNj4yz UKePY0z4UoaOVhgpN9VOwQ6/68QfoNUMxsNVbXjNpFgA6aAu/W3pFt8GJZ7btnBZ9Zc/ uJrw== 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:autocrypt:from:references:cc:to:subject; bh=vYa7WKGnOoUIzJIJQGTY15PEqUZ7MtPWlwikhUMb7fA=; b=cIDrNY+RIv9kStnx8rbdV29ZoYVKFemVlSxsfUANeBj8VoAABbECx9j2AQPDmeqKsE 3GMnG6phxYw3HcviOVmz8TG0VStYE7/HN41UDcnzXF2/j6nCk7crTRgrVkbA8S1ytnBP kgqT+f5OZKe1dLP4IJLM53p9e2hheXs1aQYixV1xFEZswTjwB8dmqqktGpCEu4tff7C1 8eVKxt4xi5p6QTntmN6c5BJWvpC9HaLWf/XyPXOYG0gd+ht/XS7zMOdx40PquymxGNT1 JiW9I2DQiNENdTI8II1NSJIR4UipjtXPE1mlNpYYRhoDLylOQ4xMA63z+qnPp1/nWIe0 YBmg== 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 h21si1127382otr.235.2020.02.26.04.17.24; Wed, 26 Feb 2020 04:17:36 -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 S1727301AbgBZMRP (ORCPT + 99 others); Wed, 26 Feb 2020 07:17:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:35856 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726334AbgBZMRO (ORCPT ); Wed, 26 Feb 2020 07:17:14 -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 66047ACE8; Wed, 26 Feb 2020 12:17:11 +0000 (UTC) Subject: Re: [PATCH bpf-next v3 0/5] bpftool: Make probes which emit dmesg warnings optional To: Quentin Monnet , 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: <20200225194446.20651-1-mrostecki@opensuse.org> From: Michal Rostecki Autocrypt: addr=mrostecki@opensuse.org; keydata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MUxv Xj6bvOCrCR0PfWxalS3RJT7z4OsETAG7QT4yOlqOhP5uue3I6WnzaQPZU0Gp9+vyQpuCVPdl HbK2kx9hg5imRgmZLOKyjdhbABEBAAGJAjwEGAEIACYWIQT/E9T3XseWowVW0Uzv+F2zUklp VQUCXjCGiwIbDAUJAeDBJQAKCRDv+F2zUklpVaFiEACHVCJJPXenIc5C4zkuu1pn0dmouoZV LWEyk3zjcC7wVJ/RGr4apLKU0hAfp9O12/s4mxa3lzZ9EvaWUY7NwwYx4kCmVcsq2+a6NVNI nkKUqPvj8sXd9dHWk283hDwrQrL7QPysr767TrLcXQ2l8o19q02lN/D7Jte37td8JMrsErEF B0Q31D+HWnn1rFJCeCn5/vwHgDW8wWtYYisv/EmUf7ppP9teiNtrQinyljTUMsb1hiy2HkhL qEOR7Q/NVk1yDC+oyQ08Zvt9LkELo3fPoeXX8RlbCUA36zq+3HsHggI6XJNmYDSS+l7N5r9B GEGFgLvCFJMP6nNX16nkvpYflxIzlmAAWQUR8K/VGvW8YgfRJBVw7+AhCe7mXubIbTa9IrJs QR74gvfGuJWrWq0ZtOzS5cKxos0rF2VON2rig5+5lf9A1UP1ZH0nfVCx5iXuJ1O1ld6tXHpD qRunpTuuKg3wkHCAS4oC/ECFHV8JukpgEuR7CNvBbYyjc7BFImmOe0bGbbntFnU173ehj0A0 hjrs3VY5x7TDedJwEr5iMKzvI4NlXNQEjDEltBN88gMvtFo6w8W/bbe6OalIEfs42DS+5KIg X91a5VRZRQo853ef/YjTRCZkGhUJ9A5uCLodR14o+C2Lzc3EmJ89awrqiAirZWPuZHCfud+f ZURUUA== Message-ID: <0e46d001-a137-97bc-262c-e864cf3f90b8@opensuse.org> Date: Wed, 26 Feb 2020 13:17:10 +0100 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/26/20 12:17 PM, Quentin Monnet wrote: > 2020-02-25 20:44 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. >> >> [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 >> > > This version looks good to me, thanks! > > Reviewed-by: Quentin Monnet > > (Please keep Acked-by/Reviewed-by tags between versions if there are no > significant changes, here for patch 1.) Sorry, I will do that next time. > That's a lot of tests now that we don't have the regex and filtering is > very straightforward, but it does not hurt. I checked and they all pass > on my system. I know that those tests were necessary with the regex implementation and now they may seem to be an overkill. But on the other hand, I think that having selftests for bpftool in general is a good thing, so I didn't want throw them away despite the easier implementation of my patches. I might follow up with some more tests covering the other subcommands in future. Cheers, Michal