kernel_optimize_test/arch/arm64/net
Zi Shen Lim 42ff712bc0 arm64: bpf: add extra pass to handle faulty codegen
Code generation functions in arch/arm64/kernel/insn.c previously
BUG_ON invalid parameters. Following change of that behavior, now we
need to handle the error case where AARCH64_BREAK_FAULT is returned.

Instead of error-handling on every emit() in JIT, we add a new
validation pass at the end of JIT compilation. There's no point in
running JITed code at run-time only to trap due to AARCH64_BREAK_FAULT.
Instead, we drop this failed JIT compilation and allow the system to
gracefully fallback on the BPF interpreter.

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-17 19:15:26 -05:00
..
bpf_jit_comp.c arm64: bpf: add extra pass to handle faulty codegen 2016-01-17 19:15:26 -05:00
bpf_jit.h arm64: bpf: fix div-by-zero case 2015-11-06 16:58:36 +00:00
Makefile arm64: eBPF JIT compiler 2014-09-08 14:39:21 +01:00