summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLorenz Bauer <lmb@cloudflare.com>2019-03-22 09:54:01 +0800
committerAlexei Starovoitov <ast@kernel.org>2019-03-21 18:59:10 -0700
commitedbf8c01de5a104a71ed6df2bf6421ceb2836a8e (patch)
tree5e603fa0b5f6f5a02f846d68c34050e1aafb4642 /kernel
parent85a51f8c28b9812642d76db6889f3f39dc3fbab3 (diff)
downloadlinux-edbf8c01de5a104a71ed6df2bf6421ceb2836a8e.tar.bz2
bpf: add skc_lookup_tcp helper
Allow looking up a sock_common. This gives eBPF programs access to timewait and request sockets. Signed-off-by: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/verifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index a476e13201d6..dffeec3706ce 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -369,7 +369,8 @@ static bool is_release_function(enum bpf_func_id func_id)
static bool is_acquire_function(enum bpf_func_id func_id)
{
return func_id == BPF_FUNC_sk_lookup_tcp ||
- func_id == BPF_FUNC_sk_lookup_udp;
+ func_id == BPF_FUNC_sk_lookup_udp ||
+ func_id == BPF_FUNC_skc_lookup_tcp;
}
static bool is_ptr_cast_function(enum bpf_func_id func_id)