OSDN Git Service

selftests/bpf: Test variable offset stack access
authorAndrey Ignatov <rdna@fb.com>
Fri, 29 Mar 2019 01:01:58 +0000 (18:01 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 29 Mar 2019 19:05:35 +0000 (12:05 -0700)
commit8ff80e96e3ccea5ff0a890d4f18997e0344dbec2
treecea1e550777e3137898a6f27492ded57ff40b2c5
parent2011fccfb61bbd1d7c8864b2b3ed7012342e9ba3
selftests/bpf: Test variable offset stack access

Test different scenarios of indirect variable-offset stack access: out of
bound access (>0), min_off below initialized part of the stack,
max_off+size above initialized part of the stack, initialized stack.

Example of output:
  ...
  #856/p indirect variable-offset stack access, out of bound OK
  #857/p indirect variable-offset stack access, max_off+size > max_initialized OK
  #858/p indirect variable-offset stack access, min_off < min_initialized OK
  #859/p indirect variable-offset stack access, ok OK
  ...

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/var_off.c