selftests/bpf: Add a selftest for invalid func btf with btf decl_tag
authorYonghong Song <yhs@fb.com>
Thu, 3 Feb 2022 19:17:32 +0000 (11:17 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 Feb 2022 21:06:04 +0000 (13:06 -0800)
commitcf1a4cbce63b766d3b7aa5eb57a56d9a2c45ca6c
tree96a329a7e099c325022b6499c9ba8baf072b04fd
parentd7e7b42f4f956f2c68ad8cda87d750093dbba737
selftests/bpf: Add a selftest for invalid func btf with btf decl_tag

Added a selftest similar to [1] which exposed a kernel bug.
Without the fix in the previous patch, the similar kasan error will appear.

  [1] https://lore.kernel.org/bpf/0000000000009b6eaa05d71a8c06@google.com/

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20220203191732.742285-1-yhs@fb.com
tools/testing/selftests/bpf/prog_tests/btf.c