summaryrefslogtreecommitdiff
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2022-05-20 16:57:51 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-06 08:48:59 +0200
commit8da0d2d056beaff23e12e543f6828f7c61e02d52 (patch)
tree69d011b32a34e9f2d28678a128b3e354a12a7151 /kernel/bpf/stackmap.c
parente8020d96dd5b2dcc1f6a8ee4f87a53a373002cd5 (diff)
bpf: Fill new bpf_prog_pack with illegal instructions
commit d88bb5eed04ce50cc20e7f9282977841728be798 upstream. bpf_prog_pack enables sharing huge pages among multiple BPF programs. These pages are marked as executable before the JIT engine fill it with BPF programs. To make these pages safe, fill the hole bpf_prog_pack with illegal instructions before making it executable. Fixes: 57631054fae6 ("bpf: Introduce bpf_prog_pack allocator") Fixes: 33c9805860e5 ("bpf: Introduce bpf_jit_binary_pack_[alloc|finalize|free]") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220520235758.1858153-2-song@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/bpf/stackmap.c')
0 files changed, 0 insertions, 0 deletions