bpf, selftests: Add verifier test for mem_or_null register with offset.
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 5 Jan 2022 19:33:34 +0000 (11:33 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 5 Jan 2022 20:00:19 +0000 (12:00 -0800)
commitca796fe66f7fceff17679ee6cc5fe4b4023de44d
treecd6f1361dd6c9f5eebe588564b5c219d53bde661
parente60b0d12a95dcf16a63225cead4541567f5cb517
bpf, selftests: Add verifier test for mem_or_null register with offset.

Add a new test case with mem_or_null typed register with off > 0 to ensure
it gets rejected by the verifier:

  # ./test_verifier 1011
  #1009/u check with invalid reg offset 0 OK
  #1009/p check with invalid reg offset 0 OK
  Summary: 2 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/spill_fill.c