OSDN Git Service

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)
commitc18f0b6aee2aaa6ab2aefd4b9aa1d89142a48824
tree3dbceef033da0908604ed6edc2b4fbc5d2f0536b
parenta2bbe7cc90755283f1db719eb757616cefd2a9fd
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