aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2021-07-04 19:02:47 +0000
committerAlexei Starovoitov <[email protected]>2021-07-16 01:17:50 +0000
commitc63829182c37c2d6d0608976d15fa61ebebe9e6b (patch)
tree99491b47f5fed463f7b5db8a7390f3376fcf523a /include/net/af_unix.h
parentaf_unix: Add a dummy ->close() for sockmap (diff)
downloadkernel-c63829182c37c2d6d0608976d15fa61ebebe9e6b.tar.gz
kernel-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 <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
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