From: Kees Cook <kees@kernel.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Shung-Hsi Yu <shung-hsi.yu@suse.com>,
bpf@vger.kernel.org, linux-mm@kvack.org,
Andrii Nakryiko <andrii@kernel.org>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
Uladzislau Rezki <urezki@gmail.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
regressions@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>
Subject: Re: [REGRESSION] bpf verifier slowdown due to vrealloc() change since 6.15-rc6
Date: Thu, 15 May 2025 11:24:16 -0700 [thread overview]
Message-ID: <202505151116.4FFA176B8@keescook> (raw)
In-Reply-To: <CAEf4Bzb4LZK5p08t1y-32wAFDGoRGKR1w1T_je6+a_EOE2uSYQ@mail.gmail.com>
On Thu, May 15, 2025 at 10:53:10AM -0700, Andrii Nakryiko wrote:
> On Thu, May 15, 2025 at 10:41 AM Kees Cook <kees@kernel.org> wrote:
> >
> > On Thu, May 15, 2025 at 10:18:21AM -0700, Pawan Gupta wrote:
> > > On Thu, May 15, 2025 at 09:51:15AM -0700, Kees Cook wrote:
> > > > On Thu, May 15, 2025 at 07:51:26AM -0700, Kees Cook wrote:
> > > > > On May 15, 2025 6:12:25 AM PDT, Shung-Hsi Yu <shung-hsi.yu@suse.com> wrote:
> > > > > >There is an observable slowdown when running BPF selftests on 6.15-rc6
> > > > > >kernel[1] built with tools/testing/selftests/bpf/{config,config.x86_64}.
> > > > > [...]
> > > > > Where can I find the .config for the slow runs?
> > > >
> > > > Oops, I can read. :) Doing a build now...
> > > >
> > > > > And how do I run the test myself directly?
> > > >
> > > > I found:
> > > > https://docs.kernel.org/bpf/bpf_devel_QA.html
> > > >
> > > > But it doesn't seem to cover a bunch of stuff (no way to prebuild the
> > > > tests, no info on building the test modules).
> > > >
> > > > This seems to be needed:
> > > >
> > > > make O=regression-bug -C tools/testing/selftests/bpf/test_kmods
> > > >
> > > > But then the booted kernel doesn't load it (missing signatures?)
> > > >
> > > > Anyway, I'll keep digging...
> > >
> > > After struggling with this for a while, I figured vmtest.sh is the easiest
> > > way to test bpf:
> > >
> > > ./tools/testing/selftests/bpf/vmtest.sh -i ./test_progs
> >
> > I can't even build the test_progs. :(
> >
> > $ make test_progs
> > ...
> > CLNG-BPF [test_progs] bpf_iter_tasks.bpf.o
> > progs/bpf_iter_tasks.c:98:8: error: call to undeclared function 'bpf_copy_from_user_task_str'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> > 98 | ret = bpf_copy_from_user_task_str((char *)task_str1, sizeof(task_str1), ptr, task, 0
> > );
> > | ^
> > 1 error generated.
> >
>
> BPF selftests expect that there was a successful kernel build done
> before that. So generally speaking:
>
> 0) cd <linux/repo/path>
> 1) export O=/path/to/build
> 2) cat tools/testing/selftests/bpf/config >> /path/to/build/.config
> 3) make O=/path/to/build -j$(nproc) oldefconfig all
> 4) cd tools/testing/selftests/bpf # everything is built within this
> directory, we don't support KBUILD_PATH or O for BPF selftests build
> artifacts
> 5) make O=/path/to/build -j$(nproc)
Linux ToT fails to build, -next fails to build. v6.14.6 fails build,
each in different ways. :(
> But tbh, if the above causes you problems, I don't think you need to
> spend that much time trying to build BPF selftests, given you know
> what the issue is and you are fixing it.
Well, nothing I've proposed makes any sense as far as something that would
double execution time, so I don't really know what the issue is yet. :P
--
Kees Cook
next prev parent reply other threads:[~2025-05-15 18:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 13:12 [REGRESSION] bpf verifier slowdown due to vrealloc() change since 6.15-rc6 Shung-Hsi Yu
2025-05-15 14:51 ` Kees Cook
2025-05-15 16:51 ` Kees Cook
2025-05-15 17:18 ` Pawan Gupta
2025-05-15 17:41 ` Kees Cook
2025-05-15 17:52 ` Pawan Gupta
2025-05-15 20:26 ` Pawan Gupta
2025-05-15 17:53 ` Andrii Nakryiko
2025-05-15 18:24 ` Kees Cook [this message]
2025-05-15 18:50 ` Eduard Zingerman
2025-05-15 15:47 ` Kees Cook
2025-05-15 15:53 ` Kees Cook
2025-05-15 15:55 ` Andrii Nakryiko
2025-05-15 16:01 ` Kees Cook
2025-05-15 18:31 ` Eduard Zingerman
2025-05-15 21:36 ` Kees Cook
2025-05-15 21:39 ` Eduard Zingerman
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=202505151116.4FFA176B8@keescook \
--to=kees@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ihor.solodrai@linux.dev \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=regressions@lists.linux.dev \
--cc=shung-hsi.yu@suse.com \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.