-
由 Martin KaFai Lau 提交于
mainline inclusion from mainline-5.13-rc1 commit 34747c41 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34747c4120418143097d4343312a0ca96c986d86 ------------------------------------------------- This patch moved the subprog specific logic from btf_check_func_arg_match() to the new btf_check_subprog_arg_match(). The core logic is left in btf_check_func_arg_match() which will be reused later to check the kernel function call. The "if (!btf_type_is_ptr(t))" is checked first to improve the indentation which will be useful for a later patch. Some of the "btf_kind_str[]" usages is replaced with the shortcut "btf_type_str(t)". Signed-off-by: NMartin KaFai Lau <kafai@fb.com> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210325015136.1544504-1-kafai@fb.com (cherry picked from commit 34747c41) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: kernel/bpf/btf.c Signed-off-by: NWang Yufen <wangyufen@huawei.com>
a3a77307