]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: allow helpers to return PTR_TO_SOCK_COMMON
authorLorenz Bauer <lmb@cloudflare.com>
Fri, 22 Mar 2019 01:54:00 +0000 (09:54 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Mar 2019 01:59:10 +0000 (18:59 -0700)
commitc9cb1aa289f83788ee18869ca7472a890c855182
tree8a21d1ca05554e8c13687ffcfd3ff668afea8446
parent7b419cb837f012781b856936570dc4f808837c7e
bpf: allow helpers to return PTR_TO_SOCK_COMMON

It's currently not possible to access timewait or request sockets
from eBPF, since there is no way to return a PTR_TO_SOCK_COMMON
from a helper. Introduce RET_PTR_TO_SOCK_COMMON to enable this
behaviour.

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