Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21955104ybl; Mon, 6 Jan 2020 14:56:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxGauf01aEFnWegSDDuB/f/osbTBbP5A3+qrIH4adx9shCd2op1hNOOsGJ7cJOQarjBx1WU X-Received: by 2002:a05:6830:605:: with SMTP id w5mr119708199oti.79.1578351382369; Mon, 06 Jan 2020 14:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578351382; cv=none; d=google.com; s=arc-20160816; b=BdcM+HJHAhPzZNrCiRsXHniGSgMD5BiyOq4znERxBePjLOCTw6QZn2pSyP2SfhfEfa pxhWmdeY5wuAZqgH9pMx/m2nK5zu/jN0Y+WX/IXYYmWUOLLnHpONulk36L/gsXpWha7B 1w0mr6ifKhnFtE18xOxGoRhRMSy76R2IuhyvOzv94mj3pxgapap0Xk0MIw+urbwtiWgE 9IPlD0wrbuEgUq1o3SDpMUuZlKcRqpufAa72duU+wIZn6+Ie7crt0wd3d+1xbnAWREcj LkitxM5N3Z/gHlEAQpTt9HIgr/NYYSkBnP9kr94e68R9LmGKcvTwnb/tAk48g/5W8Zrz gkwA== 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=WFRiw8tzqMzGqQC9zjHeMuuiCrgUK/jozTVQGyQFpeI=; b=Z7vMar6NwHbtiQoOO2kJbAr3j6L+KuitRTmkr/8YTsAms1ndleqE2hnpdZCwXOf83b g5JpV/KdGx+b0w0Wq5c5pzLoCOHNm6jl5sDmAFRLeitneCxIo7kRbDoUXoaU2RIrd7gN kDkU9VtijHs2gk5k1/QTOHFbclNyCxtG4iicoYm0dQQsQu6mQnUqX39Nx34ANq/ydYu/ 86VzGkDvNvhZT1Ra8XXGP8j6iqb+79Zm6k4ksQPDZgOZagh6ZF9Q1sjbeJuec9Znksnn oLoLI48loJAKT6hRDGDgUrijqL6dm53IlMiHR3T9qifSXbTLwpvc7+uwwq/pkHwLWgTJ P0hg== 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 p3si34791470oih.186.2020.01.06.14.56.08; Mon, 06 Jan 2020 14:56:22 -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 S1727267AbgAFWza (ORCPT + 99 others); Mon, 6 Jan 2020 17:55:30 -0500 Received: from www62.your-server.de ([213.133.104.62]:45756 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgAFWz3 (ORCPT ); Mon, 6 Jan 2020 17:55:29 -0500 Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iobHT-0004Xi-8H; Mon, 06 Jan 2020 23:55:27 +0100 Received: from [178.197.249.51] (helo=pc-9.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1iobHS-000TMk-Se; Mon, 06 Jan 2020 23:55:26 +0100 Subject: Re: [PATCH bpf-next 2/2] bpftool: Add misc secion and probe for large INSN limit To: Michal Rostecki , bpf@vger.kernel.org Cc: Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191227110605.1757-1-mrostecki@suse.de> <20191227110605.1757-3-mrostecki@suse.de> From: Daniel Borkmann Message-ID: Date: Mon, 6 Jan 2020 23:55:26 +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: <20191227110605.1757-3-mrostecki@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25686/Mon Jan 6 10:55:07 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/19 12:06 PM, Michal Rostecki wrote: > Introduce a new probe section (misc) for probes not related to concrete > map types, program types, functions or kernel configuration. Introduce a > probe for large INSN limit as the first one in that section. > > Signed-off-by: Michal Rostecki > --- > tools/bpf/bpftool/feature.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c > index 03bdc5b3ac49..4a7359b9a427 100644 > --- a/tools/bpf/bpftool/feature.c > +++ b/tools/bpf/bpftool/feature.c > @@ -572,6 +572,18 @@ probe_helpers_for_progtype(enum bpf_prog_type prog_type, bool supported_type, > printf("\n"); > } > > +static void > +probe_large_insn_limit(const char *define_prefix, __u32 ifindex) > +{ > + bool res; > + > + res = bpf_probe_large_insn_limit(ifindex); > + print_bool_feature("have_large_insn_limit", > + "Large complexity limit and maximum program size (1M)", > + "HAVE_LARGE_INSN_LIMIT", HAVE_LARGE_INSN_LIMIT is good, but official description should not explicitly state the 1M limit since this could be subject to change. Perhaps just stating "Large complexity and program size limit" is better suited here. > + res, define_prefix); > +} > + > static int do_probe(int argc, char **argv) > { > enum probe_component target = COMPONENT_UNSPEC; > @@ -724,6 +736,12 @@ static int do_probe(int argc, char **argv) > probe_helpers_for_progtype(i, supported_types[i], > define_prefix, ifindex); > > + print_end_then_start_section("misc", > + "Scanning miscellaneous eBPF features...", > + "/*** eBPF misc features ***/", > + define_prefix); > + probe_large_insn_limit(define_prefix, ifindex); > + > exit_close_json: > if (json_output) { > /* End current "section" of probes */ >