aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/net/bpf_jit_comp_64.c
diff options
context:
space:
mode:
authorGravatar Daniel Borkmann <daniel@iogearbox.net> 2018-01-20 01:24:33 +0100
committerGravatar Alexei Starovoitov <ast@kernel.org> 2018-01-19 18:37:00 -0800
commitfa9dd599b4dae841924b022768354cfde9affecb (patch)
tree9f26c547aa46c73afa8ad85cc63ef9931fb86821 /arch/sparc/net/bpf_jit_comp_64.c
parentbpf: add couple of test cases for div/mod by zero (diff)
downloadlinux-fa9dd599b4dae841924b022768354cfde9affecb.tar.gz
linux-fa9dd599b4dae841924b022768354cfde9affecb.tar.bz2
linux-fa9dd599b4dae841924b022768354cfde9affecb.zip
bpf: get rid of pure_initcall dependency to enable jits
Having a pure_initcall() callback just to permanently enable BPF JITs under CONFIG_BPF_JIT_ALWAYS_ON is unnecessary and could leave a small race window in future where JIT is still disabled on boot. Since we know about the setting at compilation time anyway, just initialize it properly there. Also consolidate all the individual bpf_jit_enable variables into a single one and move them under one location. Moreover, don't allow for setting unspecified garbage values on them. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/sparc/net/bpf_jit_comp_64.c')
-rw-r--r--arch/sparc/net/bpf_jit_comp_64.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c
index 635fdefd4ae2..50a24d7bd4c5 100644
--- a/arch/sparc/net/bpf_jit_comp_64.c
+++ b/arch/sparc/net/bpf_jit_comp_64.c
@@ -12,8 +12,6 @@
#include "bpf_jit_64.h"
-int bpf_jit_enable __read_mostly;
-
static inline bool is_simm13(unsigned int value)
{
return value + 0x1000 < 0x2000;