diff options
author | Alexei Starovoitov <ast@fb.com> | 2017-12-14 17:55:14 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-17 20:34:36 +0100 |
commit | 60b58afc96c9df71871df2dbad42037757ceef26 (patch) | |
tree | 5651c4845120fc28c9712f53f31962adfd4abe73 /arch/s390/net | |
parent | 1ea47e01ad6ea0fe99697c54c2413d81dd21fe32 (diff) | |
download | talos-obmc-linux-60b58afc96c9df71871df2dbad42037757ceef26.tar.gz talos-obmc-linux-60b58afc96c9df71871df2dbad42037757ceef26.zip |
bpf: fix net.core.bpf_jit_enable race
global bpf_jit_enable variable is tested multiple times in JITs,
blinding and verifier core. The malicious root can try to toggle
it while loading the programs. This race condition was accounted
for and there should be no issues, but it's safer to avoid
this race condition.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'arch/s390/net')
-rw-r--r-- | arch/s390/net/bpf_jit_comp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index e81c16838b90..f4baa8c514d3 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c @@ -1300,7 +1300,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp) struct bpf_jit jit; int pass; - if (!bpf_jit_enable) + if (!fp->jit_requested) return orig_fp; tmp = bpf_jit_blind_constants(fp); |