Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE5E6C43387 for ; Thu, 17 Jan 2019 10:06:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D04D20657 for ; Thu, 17 Jan 2019 10:06:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="RbUbi4e+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727616AbfAQKGW (ORCPT ); Thu, 17 Jan 2019 05:06:22 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39475 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfAQKGW (ORCPT ); Thu, 17 Jan 2019 05:06:22 -0500 Received: by mail-wm1-f66.google.com with SMTP id y8so382372wmi.4 for ; Thu, 17 Jan 2019 02:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-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=8BROoUuLRasjsPRL38tLztCc5AeQ9PedQgjuduFChJE=; b=RbUbi4e+TKWMJBVzvaF9fA8MKRFH96UvUYTegXrwsjQRSQX16ExuAgbJwlLZDicilQ 08Ydzz0N9YDwmfeqEDdeLd1EkWHosKdu1hXViszqn69ddReWXMZytgymCJGa6dNHmpxA 8Gz3O9JBgttrP1kOxpG94/oawUuTh7iIuoXhzDmb8dbGEo36h4xkoZInl9/qVTevws+8 NhU7QpTeTVAPJmKqOG4I29KcihAasl66slF7tiu73/xjUA8YQCzWqY8XNuRE3kuvEhAx lcwkIiZ6KC2WEcR4jeArmffb//gLu9PC72PxEaQ5X+DVV8PoVoYxqCnxZZ2ZE6ihAF8b lzxw== 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=8BROoUuLRasjsPRL38tLztCc5AeQ9PedQgjuduFChJE=; b=Ld7wa5hLErXLvzU0vvKui0hEDGCZvsFYMMzYAN+IdcTAT1NTWFzuD1p84Wl49rQhsm cjhYn2pXIDLzYXo7/QaSkIg3ueh18UMHE5/PFiRBDwuL50L80/r8qA+MaJqZ2caaJWeG dtUTL/qZR9w1fpjXuW91cxtzF65+uoLruogLERfCRvAqnwkHkQHtE6shVDE4e2Q6uenk QV0lWrT3ENz5ngZ1F0GCPM6tecp9d64WcqGHIBmsv0AA+72cGt32VHmyf3YATFLWnYZB SgCIMWoALaBab7ydURDo005jWZ66KZ9rM5OUlrgHbZm/0YROLW4quAa+KIQjxqccNcPf SsLA== X-Gm-Message-State: AJcUukelpjtBnkY8Ubn4vzRi76FPzkSa5zBynmXWdGHhxD/iTl3IL8lx +/tL7yB1RO9gNX4/L3uxNPumGA== X-Google-Smtp-Source: ALg8bN79shcAhaqfb9WIefXf+xE6nmBuWaOoNnwPBKqiyWWJWrMoBo+CaMzQg52GQF1G9bfiyc6V7w== X-Received: by 2002:a1c:910e:: with SMTP id t14mr10977586wmd.111.1547719579901; Thu, 17 Jan 2019 02:06:19 -0800 (PST) Received: from [192.168.1.2] ([194.53.187.240]) by smtp.gmail.com with ESMTPSA id 67sm133524041wra.37.2019.01.17.02.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 02:06:19 -0800 (PST) Subject: Re: [PATCH bpf-next v4 0/9] tools: bpftool: add probes for system and device To: Stanislav Fomichev Cc: Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, oss-drivers@netronome.com, Arnaldo Carvalho de Melo , Jesper Dangaard Brouer , Stanislav Fomichev References: <20190116142119.8358-1-quentin.monnet@netronome.com> <20190116171545.GE726@mini-arch> From: Quentin Monnet Message-ID: <2ad6289d-d454-8dc8-a5f9-7ddddf070dcd@netronome.com> Date: Thu, 17 Jan 2019 10:06:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190116171545.GE726@mini-arch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2019-01-16 09:15 UTC-0800 ~ Stanislav Fomichev > On 01/16, Quentin Monnet wrote: >> Hi, >> This set adds a new command to bpftool in order to dump a list of >> eBPF-related parameters for the system (or for a specific network >> device) to the console. Once again, this is based on a suggestion from >> Daniel. >> >> At this time, output includes: >> >> - Availability of bpf() system call >> - Availability of bpf() system call for unprivileged users >> - JIT status (enabled or not, with or without debugging traces) >> - JIT hardening status >> - JIT kallsyms exports status >> - Global memory limit for JIT compiler for unprivileged users >> - Status of kernel compilation options related to BPF features >> - Availability of known eBPF program types >> - Availability of known eBPF map types >> - Availability of known eBPF helper functions >> >> There are three different ways to dump this information at this time: >> >> - Plain output dumps probe results in plain text. It is the most >> flexible options for providing descriptive output to the user, but >> should not be relied upon for parsing the output. >> - JSON output is supported. >> - A third mode, available through the "macros" keyword appended to the >> command line, dumps some of those parameters (not all) as a series of >> "#define" directives, that can be included into a C header file for >> example. >> >> Probes for supported program and map types, and supported helpers, are >> directly added to libbpf, so that other applications (or selftests) can >> reuse them as necessary. >> >> If the user does not have root privileges (or more precisely, the >> CAP_SYS_ADMIN capability) detection will be erroneous for most >> parameters. Therefore, forbid non-root users to run the command. >> >> v4: >> - Probe bpf_jit_limit parameter (patch 2). >> - Probe some additional kernel config options (patch 3). >> - Minor fixes on patch 6. > Looks great! For the whole series: > > Reviewed-by: Stanislav Fomichev Thanks for the reviews! :)