Sashiko discussions
 help / color / mirror / Atom feed
* Re: [PATCH bpf-next v2 19/23] selftests/bpf: Add verifier tests for stack argument validation
       [not found] ` <20260509013809.18E7DC2BCB0@smtp.kernel.org>
@ 2026-05-10 17:27   ` Yonghong Song
  0 siblings, 0 replies; only message in thread
From: Yonghong Song @ 2026-05-10 17:27 UTC (permalink / raw)
  To: sashiko; +Cc: bpf



On 5/9/26 3:38 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The tests in `verifier_stack_arg_order.c` are never executed because the file is not registered in the selftests runner.
> --
>
> commit 6834becc44d439e99d840e596d30164699006d53
> Author: Yonghong Song <yonghong.song@linux.dev>
>
> selftests/bpf: Add verifier tests for stack argument validation
>
> This commit adds new BPF selftests using inline assembly to validate the
> verifier's logic for stack arguments. It covers positive tests and various
> negative tests for verifier rejection and pointer/reference tracking.
>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/verifier.c b/tools/testing/selftests/bpf/prog_tests/verifier.c
>> index a96b25ebff234..aef21cf2987be 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/verifier.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/verifier.c
>> @@ -91,6 +91,7 @@
>>   #include "verifier_sockmap_mutate.skel.h"
>>   #include "verifier_spill_fill.skel.h"
>>   #include "verifier_spin_lock.skel.h"
>> +#include "verifier_stack_arg.skel.h"
> Did you intend to include verifier_stack_arg_order.skel.h here as well?

Yes.

>
>>   #include "verifier_stack_ptr.skel.h"
>>   #include "verifier_store_release.skel.h"
>>   #include "verifier_subprog_precision.skel.h"
>> @@ -238,6 +239,7 @@ void test_verifier_sock_addr(void)            { RUN(verifier_sock_addr); }
>>   void test_verifier_sockmap_mutate(void)       { RUN(verifier_sockmap_mutate); }
>>   void test_verifier_spill_fill(void)           { RUN(verifier_spill_fill); }
>>   void test_verifier_spin_lock(void)            { RUN(verifier_spin_lock); }
>> +void test_verifier_stack_arg(void)            { RUN(verifier_stack_arg); }
> Could this be missing a RUN(verifier_stack_arg_order) entry?

Yes. Thanks for capturing this. Will fix.

>
> The patch introduces the new tests for load ordering validation below,
> but without registering them in the selftests runner, it looks like
> they will not be executed.
>
> [ ... ]
>
>> diff --git a/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c b/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c
>> new file mode 100644
>> index 0000000000000..671c79969c6cd
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/progs/verifier_stack_arg_order.c
>> @@ -0,0 +1,86 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-10 17:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260507213145.1139004-1-yonghong.song@linux.dev>
     [not found] ` <20260509013809.18E7DC2BCB0@smtp.kernel.org>
2026-05-10 17:27   ` [PATCH bpf-next v2 19/23] selftests/bpf: Add verifier tests for stack argument validation Yonghong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox