Re: [PATCH 0/3] Dynptr Verifier Adjustments

From: Jose E. Marchesi
Date: Fri Apr 28 2023 - 05:05:55 EST



> On Thu, Apr 27, 2023 at 4:36 PM Daniel Rosenberg <drosen@xxxxxxxxxx> wrote:
>>
>> On Wed, Apr 26, 2023 at 4:39 PM Andrii Nakryiko
>> <andrii.nakryiko@xxxxxxxxx> wrote:
>> >
>> > Don't know, show the sequence of commands you are running?
>> >
>> > I have linux source in ~/linux, and KBUILD_OUTPUT set to
>> > ~/linux-build/default. And it only takes this:
>> >
>> > $ cd ~/linux
>> > $ make -j90 # build kernel
>> > $ cd tools/testing/selftests/bpf
>> > $ make -j90 # build selftests
>> >
>> > And that's it.
>>
>> I've tried the same, modulo some paths. I'm pretty sure it's version
>> related at this point.
>> The current issue I'm seeing is "error: indirect call in function,
>> which are not supported by eBPF" when using GCC-BPF for
>> progs/bind4_prog.c
>
> I don't think GCC-BPF is able to compile selftests properly just yet.
> So I guess the problem is that you do have some version of gcc-bpf in
> the system and selftest's Makefile tries to build gcc variants of
> test_progs? That's bad (I don't have GCC-BPF locally, and everyone
> else apparently as well).
>
> So for now just `make BPF_GCC=` ? CC'ing Jose, we should probably
> agree on some criteria of "GCC-BPF is really capable of building
> selftests" and adjust Makefile to only attempt GCC BPF build in that
> case.

Being able to run the selftests is our goal at the moment, but we are
not there yet, no.

What about making the kernel build system to emit a visible warning
before it builds the GCC variants of the tests programs? Something like
"this is experimental and will likely fail".

>>
>> Currently using clang 16.0.0 and gcc 12.2.0-14.
>> I did manage to get it to build by just commenting out TEST_GEN_PROGS
>> += test_progs-bpf_gcc