Re: [PATCH 5.11] io_uring: don't take fs for recvmsg/sendmsg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

But as far as I can see this is only in the recvmsg path, I'd need it
for sendmsg. Can this be fixed? It would also be great to have a way to
detect support for this from userspace.

It would also be great to somehow fill in .msg_iocb and handle
-EIOCBQUEUED from a socket and let a iocb->ki_complete() function to be called
in order to handle completions.

metze

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux