]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Check ARG_PTR_TO_SPINLOCK register type in check_func_arg
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 21 Sep 2020 12:12:25 +0000 (13:12 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Sep 2020 22:00:41 +0000 (15:00 -0700)
commit8e55415632e59b7b1d76797cb440a8d40049dc9f
tree3dbceef033da0908604ed6edc2b4fbc5d2f0536b
parent3130714c5d7d1586c4ce9100703231d46625a4c8
bpf: Check ARG_PTR_TO_SPINLOCK register type in check_func_arg

Move the check for PTR_TO_MAP_VALUE to check_func_arg, where all other
checking is done as well. Move the invocation of process_spin_lock away
from the register type checking, to allow a future refactoring.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200921121227.255763-10-lmb@cloudflare.com
kernel/bpf/verifier.c