OSDN Git Service

bpf: Add PTR_TO_SOCKET verifier type
authorJoe Stringer <joe@wand.net.nz>
Tue, 2 Oct 2018 20:35:33 +0000 (13:35 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 3 Oct 2018 00:53:47 +0000 (02:53 +0200)
commitc64b7983288e636356f7f5f652de4813e1cfedac
treeedfb41aae5c1be5e89e0e8f7a64a5d10f6e6b500
parent840b9615d6e9d134178b4dd4f3c30aa30643a379
bpf: Add PTR_TO_SOCKET verifier type

Teach the verifier a little bit about a new type of pointer, a
PTR_TO_SOCKET. This pointer type is accessed from BPF through the
'struct bpf_sock' structure.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
include/linux/bpf_verifier.h
kernel/bpf/verifier.c
net/core/filter.c