From: Yonghong Song <yhs@meta.com>
To: Rong Tao <rtoax@foxmail.com>, andrii@kernel.org
Cc: ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net,
kernel-team@fb.com
Subject: Re: [PATCH bpf-next 2/9] libbpf: make __kptr and __kptr_ref
Date: Wed, 28 Dec 2022 11:03:24 -0800 [thread overview]
Message-ID: <a797cbbd-3035-716f-f19d-e317cede1af1@meta.com> (raw)
In-Reply-To: <tencent_BB1AE2BEC1B8D07716D9E5AE0AEE2BDAE806@qq.com>
On 12/26/22 3:34 AM, Rong Tao wrote:
> Hi, Andrii. It is much better to get an explicit compiler error than
> to debug the BPF Verifier failure later. But should we let the other
> selftests continue to compile?
>
> I get the following compilation error, and the compilation is aborted:
btf_type_tag and btf_decl_tag are supported since llvm14, could you
upgrade your compiler? If you want to truely test selftests, you should
try to use recent compilers, otherwise, some selftests may fail and
some others may be skipped.
>
>
> $ make -C tools/testing/selftests/bpf/
> CLNG-BPF [test_maps] cgrp_ls_attach_cgroup.bpf.o
> progs/cb_refs.c:7:29: error: unknown attribute 'btf_type_tag' ignored [-Werror,-Wunknown-attributes]
> struct prog_test_ref_kfunc __kptr_ref *ptr;
> ^~~~~~~~~~
> /home/rongtao/Git/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:178:35: note: expanded from macro '__kptr_ref'
> #define __kptr_ref __attribute__((btf_type_tag("kptr_ref")))
> ^~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [Makefile:541: /home/rongtao/Git/linux/tools/testing/selftests/bpf/cb_refs.bpf.o] Error 1
> make: *** Waiting for unfinished jobs....
> In file included from progs/cgrp_kfunc_failure.c:8:
> progs/cgrp_kfunc_common.h:13:16: error: unknown attribute 'btf_type_tag' ignored [-Werror,-Wunknown-attributes]
> struct cgroup __kptr_ref * cgrp;
> ^~~~~~~~~~
> /home/rongtao/Git/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:178:35: note: expanded from macro '__kptr_ref'
> #define __kptr_ref __attribute__((btf_type_tag("kptr_ref")))
> ^~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [Makefile:541: /home/rongtao/Git/linux/tools/testing/selftests/bpf/cgrp_kfunc_failure.bpf.o] Error 1
> In file included from progs/cgrp_kfunc_success.c:8:
> progs/cgrp_kfunc_common.h:13:16: error: unknown attribute 'btf_type_tag' ignored [-Werror,-Wunknown-attributes]
> struct cgroup __kptr_ref * cgrp;
> ^~~~~~~~~~
> /home/rongtao/Git/linux/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:178:35: note: expanded from macro '__kptr_ref'
> #define __kptr_ref __attribute__((btf_type_tag("kptr_ref")))
> ^~~~~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [Makefile:541: /home/rongtao/Git/linux/tools/testing/selftests/bpf/cgrp_kfunc_success.bpf.o] Error 1
> make: Leaving directory '/home/rongtao/Git/linux/tools/testing/selftests/bpf'
>
> Best wishes.
> Rong Tao
next prev parent reply other threads:[~2022-12-28 19:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 0:41 [PATCH bpf-next 0/9] Misc libbpf fixes and small improvements Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 1/9] selftests/bpf: prevent skeleton generation race Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 2/9] libbpf: make __kptr and __kptr_ref unconditionally use btf_type_tag() attr Andrii Nakryiko
2022-12-26 11:34 ` [PATCH bpf-next 2/9] libbpf: make __kptr and __kptr_ref Rong Tao
2022-12-28 19:03 ` Yonghong Song [this message]
2022-05-09 0:41 ` [PATCH bpf-next 3/9] libbpf: improve usability of field-based CO-RE helpers Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 4/9] selftests/bpf: use both syntaxes for " Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 5/9] libbpf: complete field-based CO-RE helpers with field offset helper Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 6/9] selftests/bpf: add bpf_core_field_offset() tests Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 7/9] libbpf: provide barrier() and barrier_var() in bpf_helpers.h Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 8/9] libbpf: automatically fix up BPF_MAP_TYPE_RINGBUF size, if necessary Andrii Nakryiko
2022-05-10 15:34 ` Nathan Chancellor
2022-05-10 18:47 ` Andrii Nakryiko
2022-05-09 0:41 ` [PATCH bpf-next 9/9] selftests/bpf: test libbpf's ringbuf size fix up logic Andrii Nakryiko
2022-05-09 15:20 ` [PATCH bpf-next 0/9] Misc libbpf fixes and small improvements patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a797cbbd-3035-716f-f19d-e317cede1af1@meta.com \
--to=yhs@meta.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=rtoax@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox