]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/verifier: remove varlen_map_value_access flag
authorEdward Cree <ecree@solarflare.com>
Wed, 23 Aug 2017 14:10:50 +0000 (15:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Aug 2017 05:38:08 +0000 (22:38 -0700)
commit219e6f161b3ba5b5e74e9259222395b44b6b73ee
tree1e388805090774a172afdca917e657dad8b300ff
parent93897c5b5cf74a3a335133ad3f7e02760034cbe6
bpf/verifier: remove varlen_map_value_access flag

The optimisation it does is broken when the 'new' register value has a
 variable offset and the 'old' was constant.  I broke it with my pointer
 types unification (see Fixes tag below), before which the 'new' value
 would have type PTR_TO_MAP_VALUE_ADJ and would thus not compare equal;
 other changes in that patch mean that its original behaviour (ignore
 min/max values) cannot be restored.
Tests on a sample set of cilium programs show no change in count of
 processed instructions.

Fixes: 8e11845d64e4 ("bpf/verifier: rework value tracking")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf_verifier.h
kernel/bpf/verifier.c