]> git.baikalelectronics.ru Git - kernel.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)
commitc1214721dd2c08baf83f932829aea9ef0207c72c
tree3d19f0d31a0dcfdd7a8e1f0a8968799d62c270d2
parent4ff668bd7887013c81676843aec4a51899175b08
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]