summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLorenz Bauer <lmb@cloudflare.com>2021-10-14 15:25:53 +0100
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:51:51 +0300
commitf10e982d3b2ead1b049225b5bd8b149a43e3705b (patch)
treef2b0c94b3ec8991a4e7586457defbc5c747aee4e /net
parentbfe07625deded524e7b7c68fdbe26dc0b8ada071 (diff)
bpf: Prevent increasing bpf_jit_limit above max
[ Upstream commit fadb7ff1a6c2c565af56b4aacdd086b067eed440 ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/sysctl_net_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index b4318c1b5b96..f62e177267c3 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -368,7 +368,7 @@ static struct ctl_table net_core_table[] = {
.mode = 0600,
.proc_handler = proc_dolongvec_minmax_bpf_restricted,
.extra1 = &long_one,
- .extra2 = &long_max,
+ .extra2 = &bpf_jit_limit_max,
},
#endif
{