Re: [PATCH 1/1] io_uring/af_unix: disable sending io_uring over sockets

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

 



On 12/8/23 16:06, Jeff Moyer wrote:
Jann Horn <jannh@xxxxxxxxxx> writes:

On Fri, Dec 8, 2023 at 4:00 PM Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
Jens Axboe <axboe@xxxxxxxxx> writes:

On Wed, 06 Dec 2023 13:26:47 +0000, Pavel Begunkov wrote:
File reference cycles have caused lots of problems for io_uring
in the past, and it still doesn't work exactly right and races with
unix_stream_read_generic(). The safest fix would be to completely
disallow sending io_uring files via sockets via SCM_RIGHT, so there
are no possible cycles invloving registered files and thus rendering
SCM accounting on the io_uring side unnecessary.

[...]

Applied, thanks!

So, this will break existing users, right?

Do you know of anyone actually sending io_uring FDs over unix domain
sockets?

I do not.  However, it's tough to prove no software is doing this.

That seems to me like a fairly weird thing to do.

I am often surprised by what developers choose to do.  I attribute that
to my lack of imagination.

Thinking again about who might possibly do such a thing, the only
usecase I can think of is CRIU; and from what I can tell, CRIU doesn't
yet support io_uring anyway.

I'm not lobbying against turning this off, and I'm sure Pavel had
already considered the potential impact before posting.  It would be

Jens already replied, but I wanted to add that it was discussed and
decided to go forward with, because there are no too obvious / known
users, and the benefits including safety outweigh it.

good to include that information in the commit message, in my opinion.

Yeah, agree with that

--
Pavel Begunkov




[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