aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf_verifier.h
diff options
context:
space:
mode:
authorJoe Stringer <joe@wand.net.nz>2018-10-02 13:35:33 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-03 02:53:47 +0200
commitc64b7983288e636356f7f5f652de4813e1cfedac (patch)
treeedfb41aae5c1be5e89e0e8f7a64a5d10f6e6b500 /include/linux/bpf_verifier.h
parentbpf: Generalize ptr_or_null regs check (diff)
downloadlinux-dev-c64b7983288e636356f7f5f652de4813e1cfedac.tar.xz
linux-dev-c64b7983288e636356f7f5f652de4813e1cfedac.zip
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>
Diffstat (limited to 'include/linux/bpf_verifier.h')
-rw-r--r--include/linux/bpf_verifier.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index d0e7f97e8b60..a411363098a5 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -58,6 +58,8 @@ struct bpf_reg_state {
* offset, so they can share range knowledge.
* For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we
* came from, when one is tested for != NULL.
+ * For PTR_TO_SOCKET this is used to share which pointers retain the
+ * same reference to the socket, to determine proper reference freeing.
*/
u32 id;
/* For scalar types (SCALAR_VALUE), this represents our knowledge of