bpf: Add attach_type checks under bpf_prog_attach_check_attach_type
authorJiri Olsa <jolsa@kernel.org>
Wed, 9 Aug 2023 08:34:14 +0000 (10:34 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Aug 2023 22:51:25 +0000 (15:51 -0700)
commit3505cb9fa26cfec9512744466e754a8cbc2365b0
tree79a1d25913ce1cdc8a4023a98128ea45ce4ce161
parentc5487f8d91868eeab17a59cf4d164ea113f90252
bpf: Add attach_type checks under bpf_prog_attach_check_attach_type

Add extra attach_type checks from link_create under
bpf_prog_attach_check_attach_type.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230809083440.3209381-3-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/syscall.c