]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add AND verifier test case where 32bit and 64bit bounds differ
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 24 Sep 2020 18:45:22 +0000 (11:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 25 Sep 2020 23:47:21 +0000 (16:47 -0700)
commitcc9e4ea6425f6faee38f9767d59bf27d4431176e
treebcf45b695eacf2e94bc2c8ddf58a8f6b4bdb8d4f
parentbb4a26b8f9be46a32f935e8b43a2294dadd2f0eb
bpf: Add AND verifier test case where 32bit and 64bit bounds differ

If we AND two values together that are known in the 32bit subregs, but not
known in the 64bit registers we rely on the tnum value to report the 32bit
subreg is known. And do not use mark_reg_known() directly from
scalar32_min_max_and()

Add an AND test to cover the case with known 32bit subreg, but unknown
64bit reg.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/and.c