linux/tools/testing/selftests/bpf
Gianluca Borello f0318d01b6 bpf: allow adjusted map element values to spill
commit 484611357c ("bpf: allow access into map value arrays")
introduces the ability to do pointer math inside a map element value via
the PTR_TO_MAP_VALUE_ADJ register type.

The current support doesn't handle the case where a PTR_TO_MAP_VALUE_ADJ
is spilled into the stack, limiting several use cases, especially when
generating bpf code from a compiler.

Handle this case by explicitly enabling the register type
PTR_TO_MAP_VALUE_ADJ to be spilled. Also, make sure that min_value and
max_value are reset just for BPF_LDX operations that don't result in a
restore of a spilled register from stack.

Signed-off-by: Gianluca Borello <g.borello@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-09 16:56:27 -05:00
..
.gitignore bpf: Preserve const register type on const OR alu ops 2016-12-05 13:40:05 -05:00
bpf_sys.h bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
bpf_util.h bpf: fix multiple issues in selftest suite and samples 2016-11-27 20:38:47 -05:00
config bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
Makefile bpf: Add tests for the LRU bpf_htab 2016-11-15 11:50:43 -05:00
test_kmod.sh bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
test_lru_map.c bpf: fix multiple issues in selftest suite and samples 2016-11-27 20:38:47 -05:00
test_maps.c bpf: fix multiple issues in selftest suite and samples 2016-11-27 20:38:47 -05:00
test_verifier.c bpf: allow adjusted map element values to spill 2017-01-09 16:56:27 -05:00