bpf: track references based on is_acquire_func
authorLorenz Bauer <lmb@cloudflare.com>
Fri, 22 Mar 2019 01:53:59 +0000 (09:53 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Mar 2019 01:59:10 +0000 (18:59 -0700)
commit0f3adc288df8ba2ac2fea0a8e4890f9fb4cd075d
treeb5c5507a639074adb1369c6c2b15f444cb348a0e
parent48e5d98a0eb1e4cec308ed63444a505a7e7dd9e3
bpf: track references based on is_acquire_func

So far, the verifier only acquires reference tracking state for
RET_PTR_TO_SOCKET_OR_NULL. Instead of extending this for every
new return type which desires these semantics, acquire reference
tracking state iff the called helper is an acquire function.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c