selftests/bpf: test cases for regsafe() bug skipping check_id()
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 9 Dec 2022 13:57:28 +0000 (15:57 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 10 Dec 2022 21:20:52 +0000 (13:20 -0800)
commitcb578c1c9cf60275f258b5af7929c2a54a188f66
tree9e1c91dfaee6c55fe0ee90344c17178c37985c8d
parent7c884339bbff80250bfc11d56b5cf48640e6ebdb
selftests/bpf: test cases for regsafe() bug skipping check_id()

Under certain conditions it was possible for verifier.c:regsafe() to
skip check_id() call. This commit adds negative test cases previously
errorneously accepted as safe.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20221209135733.28851-3-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/direct_packet_access.c
tools/testing/selftests/bpf/verifier/value_or_null.c