public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Breno Leitao <[email protected]>,
	[email protected], [email protected],
	[email protected], [email protected],
	[email protected], [email protected], [email protected]
Cc: [email protected], [email protected],
	[email protected], [email protected]
Subject: Re: [PATCH v6 7/8] io_uring/cmd: Introduce SOCKET_URING_OP_SETSOCKOPT
Date: Wed, 13 Sep 2023 13:39:53 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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


  reply	other threads:[~2023-09-13 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 15:27 [PATCH v6 0/8] io_uring: Initial support for {s,g}etsockopt commands Breno Leitao
2023-09-13 15:27 ` [PATCH v6 1/8] net/socket: Break down __sys_setsockopt Breno Leitao
2023-09-13 15:27 ` [PATCH v6 2/8] net/socket: Break down __sys_getsockopt Breno Leitao
2023-09-13 15:27 ` [PATCH v6 3/8] io_uring/cmd: Pass compat mode in issue_flags Breno Leitao
2023-09-13 15:27 ` [PATCH v6 4/8] selftests/net: Extract uring helpers to be reusable Breno Leitao
2023-09-13 15:27 ` [PATCH v6 5/8] io_uring/cmd: return -EOPNOTSUPP if net is disabled Breno Leitao
2023-09-13 15:27 ` [PATCH v6 6/8] io_uring/cmd: Introduce SOCKET_URING_OP_GETSOCKOPT Breno Leitao
2023-09-13 19:36   ` Jens Axboe
2023-09-13 19:37     ` Jens Axboe
2023-09-13 15:27 ` [PATCH v6 7/8] io_uring/cmd: Introduce SOCKET_URING_OP_SETSOCKOPT Breno Leitao
2023-09-13 19:39   ` Jens Axboe [this message]
2023-09-13 15:27 ` [PATCH v6 8/8] selftests/bpf/sockopt: Add io_uring support Breno Leitao
2023-09-13 20:48   ` Martin KaFai Lau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox