bpf: Simplify ptr_min_max_vals adjustment
authorJoe Stringer <joe@wand.net.nz>
Tue, 2 Oct 2018 20:35:30 +0000 (13:35 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 3 Oct 2018 00:53:47 +0000 (02:53 +0200)
commitaad2eeaf46973a0968a75640cd1f8f1c650322a0
treecf24312daa4784ab76c0a176da7ae9f56aac7319
parentf3709f69b7c5cba6323cc03c29b64293b93be817
bpf: Simplify ptr_min_max_vals adjustment

An upcoming commit will add another two pointer types that need very
similar behaviour, so generalise this function now.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/verifier.c
tools/testing/selftests/bpf/test_verifier.c