Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6157235ybv; Tue, 18 Feb 2020 11:02:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzaSrudPPTpNSrQOY6tXHZHCe0N6ZcG6kPnvPBXACG4bozOw16m4Hul8OkeFNzJVf7dG1/m X-Received: by 2002:aca:f587:: with SMTP id t129mr2105621oih.143.1582052575108; Tue, 18 Feb 2020 11:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582052575; cv=none; d=google.com; s=arc-20160816; b=qPDRPLU7Z4nR6fMXSn70sd6XzizeZScyNcWWGsqAZg+HB7Q65HFNxxQB9YmUckwbaQ vWZkhhyVbC4X8XEmpEwkALY0ZV5Z/pNj4CVZ73qEvkfqNdvDDPXgyOdx6iSjKNyIXTvS 3PDFroN4lwdTW8mTg5YfF2xMNWXIx9YfmgxUPMd/wKiP165khCnR8VlYJCoqKHr2TJyF KNbE4sOKAfe/yUtEt8fMkfspsHJPs39W3HYfQM4AMol/XAz4v4uM5OCGr1GKh78RHW1E 2pGj1ToUSXFiHmswFtTzsF+s2/HV7WUN+7Bb9l5BcBH5erC+pPYGJgFj563QUs+4u6NV TArg== 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=QwzG/L1Jr5q9/TmMAO5IccywC3T+i4muOse/FhfqlU8=; b=wJEye1Zgt5y03m0LurfZdnCaiPJ9nuxgCkTrpDZ/oQE8uwOFf7DfVcFj0wp7zvZ1VI Ixuzxr1y9jGH4XiXEc4FHr7X8iwJw2wUC/6JjD3dKAu2JQFTpIWYIJ5ujtT0kWYIrxZX 1XUdGtknuv9AR8KfeetLxDOCuA4QNvFD4i8MDKbzgQnUvg1cBc2gBFHTLZD9NdkZ5ITt CAfdPnq4n0tC2j92PKwj5eV2O8yqY3tR0Wu5QP4FhWh93Ka9huzpVRPpSaCqd0vv8yNQ 77CQk1AVDhaWGL3Q7CZFxIHNEUKSmpCWtwcOe8oVKzdZBcrIq07bk9p/eRoMBQEL5nRQ Y6sw== 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 t22si2066321oth.211.2020.02.18.11.02.41; Tue, 18 Feb 2020 11:02:55 -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 S1726444AbgBRTCe (ORCPT + 99 others); Tue, 18 Feb 2020 14:02:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:35556 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgBRTCd (ORCPT ); Tue, 18 Feb 2020 14:02:33 -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 17ADEADAB; Tue, 18 Feb 2020 19:02:31 +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 0/6] bpftool: Allow to select sections and filter probes Date: Tue, 18 Feb 2020 20:02:17 +0100 Message-Id: <20200218190224.22508-1-mrostecki@opensuse.org> X-Mailer: git-send-email 2.25.0 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 This patch series extend the "bpftool feature" subcommand with the new positional arguments: - "section", which allows to select a specific section of probes (i.e. "system_config", "program_types", "map_types"); - "filter_in", which allows to select only probes which matches the given regex pattern; - "filter_out", which allows to filter out probes which do not match the given regex pattern. 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]. [0] https://github.com/cilium/cilium/issues/10048 Michal Rostecki (6): bpftool: Move out sections to separate functions bpftool: Allow to select a specific section to probe bpftool: Add arguments for filtering in and filtering out probes 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 | 37 +- tools/bpf/bpftool/bash-completion/bpftool | 32 +- tools/bpf/bpftool/feature.c | 592 +++++++++++++----- tools/testing/selftests/.gitignore | 5 +- tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_bpftool.py | 294 +++++++++ tools/testing/selftests/bpf/test_bpftool.sh | 5 + 7 files changed, 811 insertions(+), 157 deletions(-) create mode 100644 tools/testing/selftests/bpf/test_bpftool.py create mode 100755 tools/testing/selftests/bpf/test_bpftool.sh -- 2.25.0