diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-20 01:24:33 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-01-20 03:37:00 +0100 |
commit | fa9dd599b4dae841924b022768354cfde9affecb (patch) | |
tree | 9f26c547aa46c73afa8ad85cc63ef9931fb86821 /arch/mips/net | |
parent | bpf: add couple of test cases for div/mod by zero (diff) | |
download | linux-fa9dd599b4dae841924b022768354cfde9affecb.tar.xz 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/mips/net')
-rw-r--r-- | arch/mips/net/bpf_jit.c | 2 | ||||
-rw-r--r-- | arch/mips/net/ebpf_jit.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c index 44b925005dd3..4d8cb9bb8365 100644 --- a/arch/mips/net/bpf_jit.c +++ b/arch/mips/net/bpf_jit.c @@ -1207,8 +1207,6 @@ jmp_cmp: return 0; } -int bpf_jit_enable __read_mostly; - void bpf_jit_compile(struct bpf_prog *fp) { struct jit_ctx ctx; diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 97069a1b6f43..4e347030ed2c 100644 --- a/arch/mips/net/ebpf_jit.c +++ b/arch/mips/net/ebpf_jit.c @@ -177,8 +177,6 @@ static u32 b_imm(unsigned int tgt, struct jit_ctx *ctx) (ctx->idx * 4) - 4; } -int bpf_jit_enable __read_mostly; - enum which_ebpf_reg { src_reg, src_reg_no_fp, |