From: Dmitrii Banshchikov me@ubique.spb.ru
mainline inclusion from mainline-5.12-rc3 commit f4eda8b6e4a5c7897c6bb992ed63a27061b371ef 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/?i...
-------------------------------------------------
Now it is possible for global function to have a pointer argument that points to something different than struct. Drop the irrelevant log message and keep the logic same.
Fixes: e5069b9c23b3 ("bpf: Support pointers in global func args") Signed-off-by: Dmitrii Banshchikov me@ubique.spb.ru Signed-off-by: Daniel Borkmann daniel@iogearbox.net Acked-by: Martin KaFai Lau kafai@fb.com Link: https://lore.kernel.org/bpf/20210223090416.333943-1-me@ubique.spb.ru (cherry picked from commit f4eda8b6e4a5c7897c6bb992ed63a27061b371ef) Signed-off-by: Wang Yufen wangyufen@huawei.com --- kernel/bpf/btf.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 172178f617c6..0fbd024a90f3 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -4320,8 +4320,6 @@ btf_get_prog_ctx_type(struct bpf_verifier_log *log, struct btf *btf, * is not supported yet. * BPF_PROG_TYPE_RAW_TRACEPOINT is fine. */ - if (log->level & BPF_LOG_LEVEL) - bpf_log(log, "arg#%d type is not a struct\n", arg); return NULL; } tname = btf_name_by_offset(btf, t->name_off);