[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <472b709f-7c89-c2d0-d9b5-7a81dd511640@iogearbox.net>
Date: Tue, 23 Jan 2018 18:27:06 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Yonghong Song <yhs@...com>, ast@...com, netdev@...r.kernel.org
Cc: kernel-team@...com
Subject: Re: [PATCH bpf-next] tools/bpf: fix a test failure in selftests prog
test_verifier
On 01/23/2018 07:10 AM, Yonghong Song wrote:
> Commit 111e6b45315c ("selftests/bpf: make test_verifier run most programs")
> enables tools/testing/selftests/bpf/test_verifier unit cases to run
> via bpf_prog_test_run command. With the latest code base,
> test_verifier had one test case failure:
>
> ...
> #473/p check deducing bounds from const, 2 FAIL retval 1 != 0
> 0: (b7) r0 = 1
> 1: (75) if r0 s>= 0x1 goto pc+1
> R0=inv1 R1=ctx(id=0,off=0,imm=0) R10=fp0,call_-1
> 2: (95) exit
>
> from 1 to 3: R0=inv1 R1=ctx(id=0,off=0,imm=0) R10=fp0,call_-1
> 3: (d5) if r0 s<= 0x1 goto pc+1
> R0=inv1 R1=ctx(id=0,off=0,imm=0) R10=fp0,call_-1
> 4: (95) exit
>
> from 3 to 5: R0=inv1 R1=ctx(id=0,off=0,imm=0) R10=fp0,call_-1
> 5: (1f) r1 -= r0
> 6: (95) exit
> processed 7 insns (limit 131072), stack depth 0
> ...
>
> The test case does not set return value in the test
> structure and hence the return value from the prog run
> is assumed to be 0. However, the actual return value is 1.
> As a result, the test failed. The fix is to correctly set
> the return value in the test structure.
>
> Fixes: 111e6b45315c ("selftests/bpf: make test_verifier run most programs")
> Signed-off-by: Yonghong Song <yhs@...com>
Applied to bpf-next, thanks Yonghong!
Powered by blists - more mailing lists