summaryrefslogtreecommitdiffstats
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorCong Wang <cong.wang@bytedance.com>2021-07-04 21:02:47 +0200
committerAlexei Starovoitov <ast@kernel.org>2021-07-16 03:17:50 +0200
commitc63829182c37c2d6d0608976d15fa61ebebe9e6b (patch)
tree99491b47f5fed463f7b5db8a7390f3376fcf523a /include/net/af_unix.h
parentaf_unix: Add a dummy ->close() for sockmap (diff)
downloadlinux-c63829182c37c2d6d0608976d15fa61ebebe9e6b.tar.xz
linux-c63829182c37c2d6d0608976d15fa61ebebe9e6b.zip
af_unix: Implement ->psock_update_sk_prot()
Now we can implement unix_bpf_update_proto() to update sk_prot, especially prot->close(). Signed-off-by: Cong Wang <cong.wang@bytedance.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210704190252.11866-7-xiyou.wangcong@gmail.com
Diffstat (limited to 'include/net/af_unix.h')
-rw-r--r--include/net/af_unix.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index f42fdddecd41..cca645846af1 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -89,4 +89,14 @@ void unix_sysctl_unregister(struct net *net);
static inline int unix_sysctl_register(struct net *net) { return 0; }
static inline void unix_sysctl_unregister(struct net *net) {}
#endif
+
+#ifdef CONFIG_BPF_SYSCALL
+extern struct proto unix_proto;
+
+int unix_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore);
+void __init unix_bpf_build_proto(void);
+#else
+static inline void __init unix_bpf_build_proto(void)
+{}
+#endif
#endif