Am 18.11.20 um 17:27 schrieb Stefan Metzmacher: > Am 07.11.20 um 17:07 schrieb Pavel Begunkov: >> On 07/11/2020 16:02, Pavel Begunkov wrote: >>> On 07/11/2020 13:46, Stefan Metzmacher wrote: >>>> Hi Pavel, >>>> >>>>> We don't even allow not plain data msg_control, which is disallowed in __sys_{send,revb}msg_sock(). >>>> >>>> Can't we better remove these checks and allow msg_control? >>>> For me it's a limitation that I would like to be removed. >>> >>> We can grab fs only in specific situations as you mentioned, by e.g. >>> adding a switch(opcode) in io_prep_async_work(), but that's the easy >>> part. All msg_control should be dealt one by one as they do different >>> things. And it's not the fact that they ever require fs. >> >> BTW, Jens mentioned that there is a queued patch that allows plain >> data msg_control. Are those not enough? > > You mean the PROTO_CMSG_DATA_ONLY check? > > It's not perfect, but better than nothing for a start. What actually have in mind for my smbdirect socket driver [1]: - I have a pipe that got filled by IORING_OP_SPLICE - The data in the pipe need to be "spliced" into a remote RDMA buffers, but I can't use IORING_OP_SPLICE again, because the RDMA buffer descriptor [2] array needs to be passed too. - I'd like to use IORING_OP_SENDMSG with MSG_OOB and msg_control. msg_control would get the RDMA buffer descriptor array and the pipe fd. The reverse operation (splicing data from remote RDMA buffers into a pipe) would be implemented with IORING_OP_RECVMSG with MSG_OOB and msg_control. I guess my smbdirect socket driver would not qualify to be marked as PROTO_CMSG_DATA_ONLY, correct? [1] https://git.samba.org/?p=metze/linux/smbdirect.git;a=blob;f=smbdirect_socket.c;h=a738854462b198e#l2076 [2] https://docs.microsoft.com/ru-ru/openspecs/windows_protocols/ms-smbd/bee890cb-48f0-42a3-ba62-f1a3a19b0edc metze