All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fix up bpf_jit_limit some more
@ 2021-10-12 13:59 ` Lorenz Bauer
  0 siblings, 0 replies; 15+ messages in thread
From: Lorenz Bauer @ 2021-10-12 13:59 UTC (permalink / raw)
  To: nicolas.dichtel, luke.r.nels, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: kernel-team, Lorenz Bauer, linux-riscv, netdev, bpf

Some more cleanups around bpf_jit_limit to make it readable via sysctl.

Jakub raised the point that a sysctl toggle is UAPI and therefore
can't be easily changed later on. I tried to find another place to stick
the info, but couldn't find a good one. All the current BPF knobs are in
sysctl.

There are examples of read only sysctls:
$ sudo find /proc/sys -perm 0444 | wc -l
90

There are no examples of sysctls with mode 0400 however:
$ sudo find /proc/sys -perm 0400 | wc -l
0

Thoughts?

Changes in v2:
* riscv not sparcv (Luke)
* Expose bpf_jit_current in bytes, not pages (Nicholas)

Lorenz Bauer (4):
  bpf: define bpf_jit_alloc_exec_limit for riscv JIT
  bpf: define bpf_jit_alloc_exec_limit for arm64 JIT
  bpf: prevent increasing bpf_jit_limit above max
  bpf: export bpf_jit_current

 Documentation/admin-guide/sysctl/net.rst |  6 ++++++
 arch/arm64/net/bpf_jit_comp.c            |  5 +++++
 arch/riscv/net/bpf_jit_core.c            |  5 +++++
 include/linux/filter.h                   |  2 ++
 kernel/bpf/core.c                        |  7 ++++---
 net/core/sysctl_net_core.c               | 26 +++++++++++++++++++++++-
 6 files changed, 47 insertions(+), 4 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-10-14 14:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 13:59 [PATCH v2 0/4] Fix up bpf_jit_limit some more Lorenz Bauer
2021-10-12 13:59 ` Lorenz Bauer
2021-10-12 13:59 ` [PATCH v2 1/4] bpf: define bpf_jit_alloc_exec_limit for riscv JIT Lorenz Bauer
2021-10-12 13:59   ` Lorenz Bauer
2021-10-12 13:59 ` [PATCH v2 2/4] bpf: define bpf_jit_alloc_exec_limit for arm64 JIT Lorenz Bauer
2021-10-12 13:59   ` Lorenz Bauer
2021-10-12 13:59 ` [PATCH v2 3/4] bpf: prevent increasing bpf_jit_limit above max Lorenz Bauer
2021-10-12 13:59 ` [PATCH v2 4/4] bpf: export bpf_jit_current Lorenz Bauer
2021-10-12 16:29   ` Nicolas Dichtel
2021-10-13  8:35     ` Lorenz Bauer
2021-10-13 12:29       ` Nicolas Dichtel
2021-10-13 19:56 ` [PATCH v2 0/4] Fix up bpf_jit_limit some more Jakub Sitnicki
2021-10-13 19:56   ` Jakub Sitnicki
2021-10-14 14:22   ` Lorenz Bauer
2021-10-14 14:22     ` Lorenz Bauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.