diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2017-01-13 22:40:01 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-01-25 13:34:25 +1100 |
commit | 10528b9c45cfb9e8f45217ef2f5ef8b876bbd3f5 (patch) | |
tree | 0090ade810bad3e98245d55d6c784c21b63d0d53 /mm/khugepaged.c | |
parent | 052de33ca4f840bf35587eacdf78b3bf8d347bb8 (diff) |
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>
Diffstat (limited to 'mm/khugepaged.c')
0 files changed, 0 insertions, 0 deletions