Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp921393ybh; Tue, 10 Mar 2020 10:49:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuszE1HstNlbFjgmNqsuqWfyVYtrkW9vhHt9pRLaHuPft0Ju4HmlcCQmmuTzcSAfQSHmYVo X-Received: by 2002:a9d:798d:: with SMTP id h13mr2140927otm.25.1583862598339; Tue, 10 Mar 2020 10:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583862598; cv=none; d=google.com; s=arc-20160816; b=hMAVQbABAsGJ7E3Wcw06gZROAyTMtCX0OhkAKIRxXS7bLx9+yt8LYuWxhQA0YuPXyZ /pLR1Tt7PoNtcy5azLdiLFj1RtahVAu/2A3D11R3jxx24w0VmTVbTJ6ddpJpCoQ75OeZ pI0ahKuDf4q/RcVUn7rZzHcvZh6zqcymJePOwlRf1s2sN2sXeuj7BdroF+ZXK1FdQ1u3 2iA3p9GthkYjLaCF5p3F52sFM+VaDlNrGTPOypm1d+kYGI4H1bRdOlV9H0/9fIbd28dC ryEHE0MUNtDetB+iuo6E0qfHCFUZHzFFu32RxCLU2LmGPWXflWtJI6FguFIwkqQSZGPH QVzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QOo8QOtiq46Mv3iqusJE/rAX/jSTXhFYzSSPT1tZ1sw=; b=H8ZSXZYXO2fmOAFOFm5nnt85iFFawBnowiV4WjorYfxqYR7IffWcQG8Q1bxb38spXJ rfnffiwGNyKec/hh1Kdcj+xST7d6DGXF7ouaNKDqmyBP6FPrKPL7zNmpJ/jFztZ7aMIy UQN1qF3R7+Ai7xPtV0TeJZ/obp2R2EVZg07nGRDwDf+aSIx7MrkCW1bu5gAkW1Bqndgt cxTJOStIHlXrvIreo1hwHtIuXndLi8OVWPTifShMshBDTf8Mx+GCNatdxGcgRyB1DBMK VGtVtx1zwTG7KxEolNgSW4l7RdUKKFkXKxMj5Yvqv0dR1oStnLS0fP1L9CcFzrt57mpL mYiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JUHQbBY+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d24si5933409oij.121.2020.03.10.10.49.46; Tue, 10 Mar 2020 10:49:58 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JUHQbBY+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727268AbgCJRrb (ORCPT + 99 others); Tue, 10 Mar 2020 13:47:31 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38138 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbgCJRr3 (ORCPT ); Tue, 10 Mar 2020 13:47:29 -0400 Received: by mail-lj1-f194.google.com with SMTP id w1so15181992ljh.5; Tue, 10 Mar 2020 10:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QOo8QOtiq46Mv3iqusJE/rAX/jSTXhFYzSSPT1tZ1sw=; b=JUHQbBY+Cv10kHOGFsDvf4lPZskoGS/yPWqEztEH2N4i836T/sf/6mzHyVZs+RQ7wl agx+oXqwk1aYgczJtmFX/p9eMgBo38i32+CSa+t/nx8/8qjJ25LikrGtts6zX1uhZDzO k8Qxq8VdMnFU5UuVr/CYcDWpE132yZFeTzKR+CHy3ryj681GyNdFLnVRyF6cecLrVp57 dCQA8+gknJtWxkymcX3fxX5al0cjJSSj9Ydkvjb8uvjRETobAVPdmpND2cn0IziUuGHf KHYv0Sgd1anwHIsEcuZlNVJLstfRH0hQ4tF5R57GDO+IqJ/OrtnEDKeBOOAUi3itwjx7 /Qwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QOo8QOtiq46Mv3iqusJE/rAX/jSTXhFYzSSPT1tZ1sw=; b=N6MhjrtxK9LtLXigz7+Wfxsa0xfAechBbSnB1UaE09kYCjOgPr6konu7ODQSlkdd7i tl5j0s2tjDhlvtS2PKsDrFg7WxSG1CSo7PH0qwpS4CH/slPAlu0KTCXz+w3ewwGvlCRl ogAcV4Nqg+HJCqGUZsUhKXRYa9eQbNtKhOSB6OwXCJs7htxRYTUPb6dMT2R7q3Oo0VPR oKSRDUXmpsjteN2C2z/Pu8m0+5nrqZxWzwqRugiCZPu0rdS8gvI2PQTQ5GXZBIwRk/Vt uQuD9bTgCyIU0QEgtFbgCjUvvbcSKrKJQ8gENYdhNRLXodCTy1N0eQttgMozX1ul3SOG 9AHA== X-Gm-Message-State: ANhLgQ0kf8Qd3fy+kTvju9TPJ29pFKWHG9FL1EH+f8tK5bD4y/Olny0G QV12YPJD/bBaQcDHdEP3/dClj20ReLR8J/oQqqM= X-Received: by 2002:a2e:8145:: with SMTP id t5mr13789511ljg.144.1583862446770; Tue, 10 Mar 2020 10:47:26 -0700 (PDT) MIME-Version: 1.0 References: <20200309180350.21075-1-steve@sk2.org> In-Reply-To: <20200309180350.21075-1-steve@sk2.org> From: Alexei Starovoitov Date: Tue, 10 Mar 2020 10:47:15 -0700 Message-ID: Subject: Re: [PATCH v2] docs: sysctl/kernel: document BPF entries To: Stephen Kitt Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , bpf , "open list:DOCUMENTATION" , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 9, 2020 at 11:05 AM Stephen Kitt wrote: > > Based on the implementation in kernel/bpf/syscall.c, > kernel/bpf/trampoline.c, include/linux/filter.h, and the documentation > in bpftool-prog.rst. > > The section style doesn't match the surrounding sections; it matches > the style of the reworked kernel.rst queued up in docs-next. > > Signed-off-by: Stephen Kitt > --- > > Notes: > Changes since v1: > - rebased on bpf-next instead of docs-next. > > Documentation/admin-guide/sysctl/kernel.rst | 24 +++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst > index def074807cee..eea7afd509ac 100644 > --- a/Documentation/admin-guide/sysctl/kernel.rst > +++ b/Documentation/admin-guide/sysctl/kernel.rst > @@ -174,6 +174,20 @@ See the type_of_loader and ext_loader_ver fields in > Documentation/x86/boot.rst for additional information. > > > +bpf_stats_enabled > +================= > + > +Controls whether the kernel should collect statistics on BPF programs > +(total time spent running, number of times run...). Enabling > +statistics causes a slight reduction in performance on each program > +run. The statistics can be seen using ``bpftool``. > + > += =================================== > +0 Don't collect statistics (default). > +1 Collect statistics. > += =================================== > + > + > cap_last_cap: > ============= > > @@ -1123,6 +1137,16 @@ NMI switch that most IA32 servers have fires unknown NMI up, for > example. If a system hangs up, try pressing the NMI switch. > > > +unprivileged_bpf_disabled > +========================= > + > +Writing 1 to this entry will disabled unprivileged calls to ``bpf()``; same typo as was pointed out earlier.