summaryrefslogtreecommitdiffstats
path: root/arch/x86/net/bpf_jit_comp.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-01-07 00:26:33 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-08 17:00:18 -0500
commit9d5ecb09d525469abd1a10c096cb5a17206523f2 (patch)
tree6596162007a93575bf50a08acb35a68ab7a5ba82 /arch/x86/net/bpf_jit_comp.c
parentf5992b72ebe0dde488fa8f706b887194020c66fc (diff)
downloadop-kernel-dev-9d5ecb09d525469abd1a10c096cb5a17206523f2.zip
op-kernel-dev-9d5ecb09d525469abd1a10c096cb5a17206523f2.tar.gz
bpf: change back to orig prog on too many passes
If after too many passes still no image could be emitted, then swap back to the original program as we do in all other cases and don't use the one with blinding. Fixes: 959a75791603 ("bpf, x86: add support for constant blinding") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/net/bpf_jit_comp.c')
-rw-r--r--arch/x86/net/bpf_jit_comp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index e76d1af..bb660e5 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1172,6 +1172,8 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
set_memory_ro((unsigned long)header, header->pages);
prog->bpf_func = (void *)image;
prog->jited = 1;
+ } else {
+ prog = orig_prog;
}
out_addrs:
OpenPOWER on IntegriCloud