* [PATCH v4] docs: sysctl/kernel: document BPF entries
@ 2020-03-15 12:26 Stephen Kitt
2020-04-20 22:59 ` Jonathan Corbet
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Kitt @ 2020-03-15 12:26 UTC (permalink / raw)
To: Jonathan Corbet, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
linux-doc
Cc: bpf, linux-kernel, Stephen Kitt
Based on the implementation in kernel/bpf/syscall.c,
kernel/bpf/trampoline.c, include/linux/filter.h, and the documentation
in bpftool-prog.rst.
Signed-off-by: Stephen Kitt <steve@sk2.org>
---
Notes:
This patch is intended for docs-next, but I'd appreciate reviews from
BPF developers.
Changes since v3:
- moved back to docs-next.
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 335696d3360d..88c51c0a5ce6 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -102,6 +102,20 @@ See the ``type_of_loader`` and ``ext_loader_ver`` fields in
:doc:`/x86/boot` 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
============
@@ -1166,6 +1180,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: 7d3d3254adaa61cba896f71497f56901deb618e5
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v4] docs: sysctl/kernel: document BPF entries
2020-03-15 12:26 [PATCH v4] docs: sysctl/kernel: document BPF entries Stephen Kitt
@ 2020-04-20 22:59 ` Jonathan Corbet
2020-04-23 18:32 ` Stephen Kitt
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2020-04-20 22:59 UTC (permalink / raw)
To: Stephen Kitt
Cc: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
Yonghong Song, Andrii Nakryiko, linux-doc, bpf, linux-kernel
On Sun, 15 Mar 2020 13:26:48 +0100
Stephen Kitt <steve@sk2.org> 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.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
> ---
>
> Notes:
> This patch is intended for docs-next, but I'd appreciate reviews from
> BPF developers.
Haven't seen a whole lot of those...it's been a month, so I'll ahead and
apply this; it can be fixed up later if need be.
Thanks,
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] docs: sysctl/kernel: document BPF entries
2020-04-20 22:59 ` Jonathan Corbet
@ 2020-04-23 18:32 ` Stephen Kitt
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Kitt @ 2020-04-23 18:32 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 726 bytes --]
On Mon, 20 Apr 2020 16:59:49 -0600, Jonathan Corbet <corbet@lwn.net> wrote:
> On Sun, 15 Mar 2020 13:26:48 +0100
> Stephen Kitt <steve@sk2.org> 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.
> >
> > Signed-off-by: Stephen Kitt <steve@sk2.org>
> > ---
> >
> > Notes:
> > This patch is intended for docs-next, but I'd appreciate reviews from
> > BPF developers.
>
> Haven't seen a whole lot of those...it's been a month, so I'll ahead and
> apply this; it can be fixed up later if need be.
Thanks, I’ll start pushing my remaining sysctl doc patches.
Regards,
Stephen
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-23 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 12:26 [PATCH v4] docs: sysctl/kernel: document BPF entries Stephen Kitt
2020-04-20 22:59 ` Jonathan Corbet
2020-04-23 18:32 ` Stephen Kitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).