Files
linux/kernel/bpf
Daniel Borkmann 0d17af4038 bpf: use array_index_nospec in find_prog_type
[ Upstream commit d0f1a451e3 ]

Commit 9ef09e35e5 ("bpf: fix possible spectre-v1 in find_and_alloc_map()")
converted find_and_alloc_map() over to use array_index_nospec() to sanitize
map type that user space passes on map creation, and this patch does an
analogous conversion for progs in find_prog_type() as it's also passed from
user space when loading progs as attr->prog_type.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:01:36 +09:00
..
2017-01-09 16:56:27 -05:00
2017-11-15 19:46:32 +09:00
2018-02-13 19:19:15 -08:00