]> asedeno.scripts.mit.edu Git - linux.git/commit
selftests/bpf: Test ARG_PTR_TO_LONG arg type
authorAndrey Ignatov <rdna@fb.com>
Tue, 19 Mar 2019 01:17:03 +0000 (18:17 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 12 Apr 2019 20:54:59 +0000 (13:54 -0700)
commitc2d5f12e4c6cf7e94cfcb98389db51557cf05f9a
tree3d19f0d31a0dcfdd7a8e1f0a8968799d62c270d2
parent99f57973ac5b8e38ee5b5e5f518cd5bf95e3b1e3
selftests/bpf: Test ARG_PTR_TO_LONG arg type

Test that verifier handles new argument types properly, including
uninitialized or partially initialized value, misaligned stack access,
etc.

Example of output:
  #456/p ARG_PTR_TO_LONG uninitialized OK
  #457/p ARG_PTR_TO_LONG half-uninitialized OK
  #458/p ARG_PTR_TO_LONG misaligned OK
  #459/p ARG_PTR_TO_LONG size < sizeof(long) OK
  #460/p ARG_PTR_TO_LONG initialized OK

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/int_ptr.c [new file with mode: 0644]