]> 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)
commitefd2512dd28c5b99e1de0899a2b8188388235b26
treeb292e6c74103ad9864d772d76d7f74ddcb06ef81
parent21dfbcc9960813a47f642567acf50011c3af1b82
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