selftests/bpf: Test unbounded var_off stack access
authorAndrey Ignatov <rdna@fb.com>
Thu, 4 Apr 2019 06:22:42 +0000 (23:22 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 5 Apr 2019 14:50:08 +0000 (16:50 +0200)
commit07f9196241f8bceef975dd15f894f8ed51425d55
treea4881fdfd7e9487249bf28017d18394560a02fef
parent107c26a70ca81bfc33657366ad69d02fdc9efc9d
selftests/bpf: Test unbounded var_off stack access

Test the case when reg->smax_value is too small/big and can overflow,
and separately min and max values outside of stack bounds.

Example of output:
  # ./test_verifier
  #856/p indirect variable-offset stack access, unbounded OK
  #857/p indirect variable-offset stack access, max out of bound OK
  #858/p indirect variable-offset stack access, min out of bound OK

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/verifier/var_off.c