[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <efe602f1-8e72-466c-b796-0083fd1c6d82@kernel.dk>
Date: Wed, 13 Sep 2023 13:39:53 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Breno Leitao <leitao@...ian.org>, sdf@...gle.com,
asml.silence@...il.com, willemdebruijn.kernel@...il.com,
kuba@...nel.org, pabeni@...hat.com, martin.lau@...ux.dev,
krisman@...e.de
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, io-uring@...r.kernel.org
Subject: Re: [PATCH v6 7/8] io_uring/cmd: Introduce SOCKET_URING_OP_SETSOCKOPT
On 9/13/23 9:27 AM, Breno Leitao wrote:
> Add support for SOCKET_URING_OP_SETSOCKOPT. This new command is similar
> to setsockopt(2). This implementation leverages the function
> do_sock_setsockopt(), which is shared with the setsockopt() system call
> path.
>
> Important to say that userspace needs to keep the pointer's memory alive
> until the operation is completed. I.e, the memory could not be
> deallocated before the CQE is returned to userspace.
This is different than other commands that write data. Since
IORING_FEAT_SUBMIT_STABLE was introduced, any command that writes data
should ensure that this data is stable. Eg it follows the life time of
the SQE, and doesn't need to be available until a CQE has been posted
for it. This is _generally_ true, even if we do have a few exceptions.
The problem is that then you cannot use user pointers, obviously, you'd
need to be able to pass in the value directly to do_sock_setsockopt()...
--
Jens Axboe
Powered by blists - more mailing lists