]> git.baikalelectronics.ru Git - kernel.git/commit
af_unix: Implement unix_dgram_bpf_recvmsg()
authorCong Wang <cong.wang@bytedance.com>
Sun, 4 Jul 2021 19:02:48 +0000 (12:02 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 16 Jul 2021 01:17:50 +0000 (18:17 -0700)
commit5691eb33f6768ea1c8ad632243f7b027e6432657
treeb292e6c74103ad9864d772d76d7f74ddcb06ef81
parent94142ecfb97d4d7e7425f8a63d0143e9f0180fe7
af_unix: Implement unix_dgram_bpf_recvmsg()

We have to implement unix_dgram_bpf_recvmsg() to replace the
original ->recvmsg() to retrieve skmsg from ingress_msg.

AF_UNIX is again special here because the lack of
sk_prot->recvmsg(). I simply add a special case inside
unix_dgram_recvmsg() to call sk->sk_prot->recvmsg() directly.

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-8-xiyou.wangcong@gmail.com
include/net/af_unix.h
net/unix/af_unix.c
net/unix/unix_bpf.c