From: Eduard Zingerman <eddyz87@gmail.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: bpf <bpf@vger.kernel.org>, KP Singh <kpsingh@kernel.org>
Subject: Re: Is tools/testing/selftests/bpf/ maintained?
Date: Fri, 13 Oct 2023 16:25:14 +0300 [thread overview]
Message-ID: <5695d6b472d932e7aba4d1f6cbd1a8002642a33f.camel@gmail.com> (raw)
In-Reply-To: <261bfeec-8230-490a-b583-d52223e2d707@I-love.SAKURA.ne.jp>
On Fri, 2023-10-13 at 22:15 +0900, Tetsuo Handa wrote:
> Thank you for showing complete command line.
>
> On 2023/10/13 1:34, Eduard Zingerman wrote:
> > # Note: kernel build is mandatory, as vmlinux.h is constructed from DWARF in ./vmlinux
>
> is what I was missing. Makefile rules should explicitly describe dependency on vmlinux ,
> or at least emit message to teach users about the need to build vmlinux ?
Yes, that would be nice.
> But I still get error. I'm using Ubuntu 22.04.3 LTS.
I think you are using clang-14, which does not like u32 instructions.
At least I get the same error message as you with clang-14.
If so, please try using clang-16 instead.
>
> ----------------------------------------
> root@ubuntu:/usr/src/linux# make -C tools/testing/selftests/bpf/
> make: Entering directory '/usr/src/linux/tools/testing/selftests/bpf'
> CLNG-BPF [test_maps] verifier_and.bpf.o
> progs/verifier_and.c:58:16: error: invalid operand for instruction
> asm volatile (" \
> ^
> <inline asm>:1:184: note: instantiated into assembly here
> r1 = 0; *(u64*)(r10 - 8) = r1; r2 = r10; r2 += -8; r1 = map_hash_48b ll; call 1; if r0 == 0 goto l0_1; r1 = *(u32*)(r0 + 0); r9 = 1; w1 %= 2; w1 += 1; w9 &= w1; w9 += 1; w9 >>= 1; w3 = 1; w3 -= w9; w3 *= 0x10000000; r0 += r3; *(u32*)(r0 + 0) = r3; l0_1: r0 = r0; exit;
> ^
> 1 error generated.
> make: *** [Makefile:598: /usr/src/linux/tools/testing/selftests/bpf/verifier_and.bpf.o] Error 1
> make: Leaving directory '/usr/src/linux/tools/testing/selftests/bpf'
> ----------------------------------------
>
next prev parent reply other threads:[~2023-10-13 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 13:39 Is tools/testing/selftests/bpf/ maintained? Tetsuo Handa
2023-10-12 16:34 ` Eduard Zingerman
2023-10-13 13:15 ` Tetsuo Handa
2023-10-13 13:25 ` Eduard Zingerman [this message]
2023-10-13 14:17 ` Tetsuo Handa
2023-10-13 14:23 ` Eduard Zingerman
2023-10-12 16:35 ` Andrii Nakryiko
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=5695d6b472d932e7aba4d1f6cbd1a8002642a33f.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=kpsingh@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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