]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: don't set id on after map lookup with ptr_to_map_val return
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 31 Oct 2018 23:05:53 +0000 (00:05 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 31 Oct 2018 23:53:17 +0000 (16:53 -0700)
commitbe6923fd2a9aa42117c27ed3ae0aa66f72322258
tree75b922a4d276ff5c53fe51680af54113f7b4f48e
parentc95df64acff9432ba3f1601864fa0621c0643661
bpf: don't set id on after map lookup with ptr_to_map_val return

In the verifier there is no such semantics where registers with
PTR_TO_MAP_VALUE type have an id assigned to them. This is only
used in PTR_TO_MAP_VALUE_OR_NULL and later on nullified once the
test against NULL has been pattern matched and type transformed
into PTR_TO_MAP_VALUE.

Fixes: ff3e82d4502e ("bpf/verifier: introduce BPF_PTR_TO_MAP_VALUE")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Roman Gushchin <guro@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c