Re: [PATCH bpf-next v2 4/4] selftests/bpf: Add verifier tests for code pattern '<const> <cond_op> <non_const>'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 6, 2023 at 9:45 AM Yonghong Song <yhs@xxxxxx> wrote:
>
> Add various tests for code pattern '<const> <cond_op> <non_const>' to
> exercise the previous verifier patch.
>
> The following are veristat changed number of processed insns stat
> comparing the previous patch vs. this patch:
>
> File                                                   Program                                               Insns (A)  Insns (B)  Insns  (DIFF)
> -----------------------------------------------------  ----------------------------------------------------  ---------  ---------  -------------
> test_seg6_loop.bpf.linked3.o                           __add_egr_x                                               12423      12314  -109 (-0.88%)
>

nit: a bit of veristat trivia for future uses. If you specify filters
properly, it will size the width of columns more tightly and you
wouldn't have to trim only relevant rows. The above would do,
probably:

sudo ./veristat *.linked3.o -e file,prog,insns -f 'insns_diff!=0'

> Only one program is affected with minor change.
>
> Signed-off-by: Yonghong Song <yhs@xxxxxx>
> ---
>  .../verifier_bounds_deduction_non_const.c     | 460 ++++++++++++++++++
>  1 file changed, 460 insertions(+)
>

Nice set of tests!

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>


> diff --git a/tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c b/tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c
> index fe570d866139..823f727cf210 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_bounds_deduction_non_const.c
> @@ -176,4 +176,464 @@ l1_%=:                                                    \
>         : __clobber_all);
>  }
>

[...]




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux