linux/arch/powerpc/net
Naveen N. Rao 10528b9c45 powerpc/bpf: Flush the entire JIT buffer
With bpf_jit_binary_alloc(), we allocate at a page granularity and fill
the rest of the space with illegal instructions to mitigate BPF spraying
attacks, while having the actual JIT'ed BPF program at a random location
within the allocated space. Under this scenario, it would be better to
flush the entire allocated buffer rather than just the part containing
the actual program. We already flush the buffer from start to the end of
the BPF program. Extend this to include the illegal instructions after
the BPF program.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-01-25 13:34:25 +11:00
..
bpf_jit32.h powerpc/bpf/jit: Isolate classic BPF JIT specifics into a separate header 2016-06-24 15:15:51 +10:00
bpf_jit64.h powerpc/bpf: Add support for bpf constant blinding 2016-10-04 20:33:20 +11:00
bpf_jit_asm64.S powerpc/ebpf/jit: Implement JIT compiler for extended BPF 2016-06-24 15:17:57 +10:00
bpf_jit_asm.S powerpc/bpf/jit: Isolate classic BPF JIT specifics into a separate header 2016-06-24 15:15:51 +10:00
bpf_jit_comp64.c powerpc/bpf: Flush the entire JIT buffer 2017-01-25 13:34:25 +11:00
bpf_jit_comp.c powerpc/bpf: Remove redundant check for non-null image 2017-01-25 13:34:24 +11:00
bpf_jit.h powerpc/bpf: Implement support for tail calls 2016-10-04 20:33:19 +11:00
Makefile powerpc/ebpf/jit: Implement JIT compiler for extended BPF 2016-06-24 15:17:57 +10:00