From: Yonghong Song <yhs@fb.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next v4 16/18] selftests/bpf: Add a test for enum64 value relocations
Date: Fri, 3 Jun 2022 19:51:36 -0700 [thread overview]
Message-ID: <dfbe2c95-b6d7-1e26-4c3d-9ae7513235d0@fb.com> (raw)
In-Reply-To: <CAADnVQJgH6X66Rg0Z5v8pTsnfZBsHeaEko6rYv=ON6RQ+2FVPA@mail.gmail.com>
On 6/3/22 8:14 AM, Alexei Starovoitov wrote:
> On Fri, Jun 3, 2022 at 4:00 AM Yonghong Song <yhs@fb.com> wrote:
>> +
>> +SEC("raw_tracepoint/sys_enter")
>> +int test_core_enum64val(void *ctx)
>> +{
>> +#if __has_builtin(__builtin_preserve_enum_value)
>> + struct core_reloc_enum64val_output *out = (void *)&data.out;
>> + enum named_unsigned_enum64 named_unsigned = 0;
>> + enum named_signed_enum64 named_signed = 0;
>
> libbpf: prog 'test_core_enum64val': relo #0: unexpected insn #0
> (LDIMM64) value: got 8589934591, exp 18446744073709551615 ->
> 18446744073709551615
> libbpf: prog 'test_core_enum64val': relo #0: failed to patch insn #0: -22
> libbpf: failed to perform CO-RE relocations: -22
> libbpf: failed to load object 'test_core_reloc_enum64val.o'
>
> Is it failing in CI because clang is too old?
Yes, the failure is due to that the llvm patch to support enum64
is not merged. The llvm patch is not merged because otherwise
people using latest compiler (with llvm patch) may fail to
latest libbpf.
> CI will pick up newer clang sooner or later,
> but the users will be confused.
> The patch 17/18 that updates README certainly helps,
> but I was wondering whether we can do a similar trick
> to what Andrii did in libbpf and make the error more human readable?
I think the above information is what current libbpf did for
relocation errors.
Unless I missed something, Andrii's commit 9fdc4273b8da ("libbpf: Fix up
verifier log for unguarded failed CO-RE relos") is to improve kernel
verifier log w.r.t. relocation failures.
next prev parent reply other threads:[~2022-06-04 2:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 1:58 [PATCH bpf-next v4 00/18] bpf: Add 64bit enum value support Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 01/18] bpf: Add btf enum64 support Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 02/18] libbpf: Permit 64bit relocation value Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 03/18] libbpf: Fix an error in 64bit relocation value computation Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 04/18] libbpf: Refactor btf__add_enum() for future code sharing Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 05/18] libbpf: Add enum64 parsing and new enum64 public API Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 06/18] libbpf: Add enum64 deduplication support Yonghong Song
2022-06-03 21:44 ` Andrii Nakryiko
2022-06-03 1:59 ` [PATCH bpf-next v4 07/18] libbpf: Add enum64 support for btf_dump Yonghong Song
2022-06-03 21:46 ` Andrii Nakryiko
2022-06-03 1:59 ` [PATCH bpf-next v4 08/18] libbpf: Add enum64 sanitization Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 09/18] libbpf: Add enum64 support for bpf linking Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 10/18] libbpf: Add enum64 relocation support Yonghong Song
2022-06-03 21:49 ` Andrii Nakryiko
2022-06-03 1:59 ` [PATCH bpf-next v4 11/18] bpftool: Add btf enum64 support Yonghong Song
2022-06-03 1:59 ` [PATCH bpf-next v4 12/18] selftests/bpf: Fix selftests failure Yonghong Song
2022-06-03 2:00 ` [PATCH bpf-next v4 13/18] selftests/bpf: Test new enum kflag and enum64 API functions Yonghong Song
2022-06-03 2:00 ` [PATCH bpf-next v4 14/18] selftests/bpf: Add BTF_KIND_ENUM64 unit tests Yonghong Song
2022-06-03 2:00 ` [PATCH bpf-next v4 15/18] selftests/bpf: Test BTF_KIND_ENUM64 for deduplication Yonghong Song
2022-06-03 2:00 ` [PATCH bpf-next v4 16/18] selftests/bpf: Add a test for enum64 value relocations Yonghong Song
2022-06-03 15:14 ` Alexei Starovoitov
2022-06-03 20:22 ` Andrii Nakryiko
2022-06-03 20:24 ` Andrii Nakryiko
2022-06-04 2:51 ` Yonghong Song [this message]
2022-06-04 9:34 ` Alexei Starovoitov
2022-06-03 2:00 ` [PATCH bpf-next v4 17/18] selftests/bpf: Clarify llvm dependency with possible selftest failures Yonghong Song
2022-06-03 2:00 ` [PATCH bpf-next v4 18/18] docs/bpf: Update documentation for BTF_KIND_ENUM64 support Yonghong Song
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=dfbe2c95-b6d7-1e26-4c3d-9ae7513235d0@fb.com \
--to=yhs@fb.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.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