Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1126758ybh; Tue, 10 Mar 2020 15:20:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vslqs2PKCWRpfHzQujU7n73Z6PDXJt1l1nthQfmWx1bjqv656A+0XDx/1EAT+hD3dnW/P5j X-Received: by 2002:aca:3287:: with SMTP id y129mr2907987oiy.1.1583878852302; Tue, 10 Mar 2020 15:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583878852; cv=none; d=google.com; s=arc-20160816; b=uU3ECJmHQA8Rv5ZruhBILcKYAnrCoMzw56gdYDQKkXUzk+i1sENUjVcBwDaYFpgbLx 1dUqBdBxtBH/Z5ZLSciq6OIciPFXUTl2oGaXpMe2b1OwCXIKJXr5t/4qFhvBhlsGilIQ eJM6J6S7h+CIvuEIjvxr+5EcIIptlIhkQ/JtjiHjH/BPajNB2IdXPCuvN86oNad2sX1A CmS4OAXYkO2CS477qkBvEcHjmTrvmbbyUCoeZ8FV1L4D6MnONAVmrebuYddBGQNyfqRL 3I1ftDVZSPV9pE7ty64UAfe5iO7Dym/m8dh9S/2t9eX/DSCcir6P9nazwPKi4FfrSv+Y y+Cw== 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=rstqKvz68QhYoAz/AFs+P/InNzY4qh2NZwcLulJ2TyU=; b=s6fQ4sBw8JC6eYqVnek7GfCnoacch2PEa/PXWR/GO8Iijr8qFbeIhxmO85Ek5EBJGz lRSe7cWMXS+0dDs1WD46jETskMN1/aLPj+XKF8fJSW8t2nQKVRXqNvQk3xJUExVuLKmx p6HFaHRLv26YU+PzMaf29BGOn3lUwU0VumSXv2FaDO9ghQrQysXVsRBAVtOCU7izsVpL Rl9e51bTcfbEHneTwLKb9KIcnrQPzbUr52Xl5t7PuuqSGUYSYRvG7m57jbuzlTZoGMOH 6PFsC9oKOC4AtilpnZBmOOzIf9krcv1oJOxQlOWbjTh+BzVw64oWlszIQikm9jVI9R4M 7glQ== 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 m138si120293oig.53.2020.03.10.15.20.40; Tue, 10 Mar 2020 15:20:52 -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; 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 S1727648AbgCJWSs (ORCPT + 99 others); Tue, 10 Mar 2020 18:18:48 -0400 Received: from 9.mo179.mail-out.ovh.net ([46.105.76.148]:60656 "EHLO 9.mo179.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgCJWSs (ORCPT ); Tue, 10 Mar 2020 18:18:48 -0400 Received: from player779.ha.ovh.net (unknown [10.108.35.232]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 9D66A155E4D for ; Tue, 10 Mar 2020 22:58:51 +0100 (CET) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player779.ha.ovh.net (Postfix) with ESMTPSA id C61D8103FEFF3; Tue, 10 Mar 2020 21:58:38 +0000 (UTC) From: Stephen Kitt To: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , bpf@vger.kernel.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH v3] docs: sysctl/kernel: document BPF entries Date: Tue, 10 Mar 2020 22:58:24 +0100 Message-Id: <20200310215824.17139-1-steve@sk2.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 980377346576829727 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedruddvtddgudegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecukfhppedtrddtrddtrddtpdekvddrieehrddvhedrvddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejjeelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v2: - fixed "will disabled" typo. 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..9e1417628572 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 disable unprivileged calls to ``bpf()``; +once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` will return +``-EPERM``. + +Once set, this can't be cleared. + + watchdog: ========= base-commit: 3e7c67d90e3ed2f34fce42699f11b150dd1d3999 -- 2.20.1