bpf: Prevent increasing bpf_jit_limit above max
authorLorenz Bauer <lmb@cloudflare.com>
Thu, 14 Oct 2021 14:25:53 +0000 (15:25 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 23 Oct 2021 00:23:53 +0000 (17:23 -0700)
commitfadb7ff1a6c2c565af56b4aacdd086b067eed440
tree3e5cda8336b05541dd33b7888ba131c1bc910871
parent5d63ae908242f028bd10860cba98450d11c079b8
bpf: Prevent increasing bpf_jit_limit above max

Restrict bpf_jit_limit to the maximum supported by the arch's JIT.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211014142554.53120-4-lmb@cloudflare.com
include/linux/filter.h
kernel/bpf/core.c
net/core/sysctl_net_core.c