Skip to content

bpf: add boot parameters for sysctl knobs

Eugene Syromiatnikov linux-doc lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v13 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bpf: add ability to configure unprivileged BPF via boot-time parameterDocumentation/admin-guide/kernel-parameters.txt init/Kconfig kernel/bpf/syscall.c+55 -00 replies
2/3bpf: add ability to configure BPF JIT hardening via boot-time parameterDocumentation/admin-guide/kernel-parameters.txt init/Kconfig kernel/bpf/core.c+56 -00 replies
3/3bpf: add ability to configure BPF JIT kallsyms export at the boot timeDocumentation/admin-guide/kernel-parameters.txt init/Kconfig kernel/bpf/core.c+54 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/3] bpf: add boot parameters for sysctl knobs

Some BPF sysctl knobs affect the loading of BPF programs, and during system boot/init stages these sysctls are not yet configured. A concrete example is systemd, that has implemented loading of BPF programs.

Thus, to allow controlling these setting at early boot, this patch set adds the ability to change the default setting of these sysctl knobs as well as option to override them via a boot-time kernel parameter (in order to avoid rebuilding kernel each time a need of changing these defaults arises).

The sysctl knobs in question are kernel.unprivileged_bpf_disable, net.core.bpf_jit_harden, and net.core.bpf_jit_kallsyms.

Eugene Syromiatnikov (3):
bpf: add ability to configure unprivileged BPF via boot-time parameter
bpf: add ability to configure BPF JIT hardening via boot-time
parameter
bpf: add ability to configure BPF JIT kallsyms export at the boot time

 Documentation/admin-guide/kernel-parameters.txt | 28 ++++++++
 init/Kconfig                                    | 90 +++++++++++++++++++++++++
 kernel/bpf/core.c                               | 31 +++++++++
 kernel/bpf/syscall.c                            | 16 +++++
 4 files changed, 165 insertions(+)
Signature · 1 line
2.1.4