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)
commit9825d866ce0d11009513e06824885340062c166b
treeb292e6c74103ad9864d772d76d7f74ddcb06ef81
parentc63829182c37c2d6d0608976d15fa61ebebe9e6b
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