diff options
author | Joe Stringer <joe@wand.net.nz> | 2018-10-02 23:35:33 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-03 03:53:47 +0300 |
commit | c64b7983288e636356f7f5f652de4813e1cfedac (patch) | |
tree | edfb41aae5c1be5e89e0e8f7a64a5d10f6e6b500 /include/linux/bpf_verifier.h | |
parent | 840b9615d6e9d134178b4dd4f3c30aa30643a379 (diff) | |
download | linux-c64b7983288e636356f7f5f652de4813e1cfedac.tar.xz |
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.h | 2 |
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 |