public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: axboe@kernel.dk, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, willemdebruijn.kernel@gmail.com,
	courmisch@gmail.com, nhorman@tuxdriver.com,
	asml.silence@gmail.com, alex.aring@gmail.com,
	dccp@vger.kernel.org, mptcp@lists.linux.dev,
	linux-kernel@vger.kernel.org, matthieu.baerts@tessares.net,
	marcelo.leitner@gmail.com, linux-wpan@vger.kernel.org,
	linux-sctp@vger.kernel.org, leit@fb.com, David.Laight@ACULAB.COM,
	dsahern@kernel.org
Subject: Re: [PATCH 0/1] net: ioctl: Use kernel buffer on proto ioctl callbacks
Date: Fri, 19 May 2023 08:15:26 -0700	[thread overview]
Message-ID: <20230519081526.59411533@kernel.org> (raw)
In-Reply-To: <20230519135821.922326-1-leitao@debian.org>

On Fri, 19 May 2023 06:58:20 -0700 Breno Leitao wrote:
> With the implementation of network ioctl on io_uring[1], Willem
> suggested[2] that the "struct proto" ioctls functions should be reused,
> instead of duplicating the code.
> For that, the ioctl callbacks need to be more flexible, and avoid
> operating on userspace buffers (doing get/put_user()) directly on the
> callbacks. This patch adds this flexibility, so, the io_uring plumbing
> becomes more clean, avoiding duplicating code. This may also benefit
> BPF.
> 
> For that, a wrapper is created, which will copy from/to userspace, and
> the ioctl callback will rely on the wrapper to do userspace memory
> copies.
> 
> I've tested this patch in three different ways:
> 1) Created a simple testcase for TCP/UDP [3]
> 2) Run relevant LTP tests, such as: sockioctl, setsockopt, bind, sendto,
> 				    fanout, ns-udpsender, etc
> 3) Run basics network selftests
> 
> PS: There are some `strcmp()` in the `sock_skprot_ioctl()`, that I was
> not able to find a better way to deal with it. Any feedback is
> appreciated.

Why not CC netdev@ on this?

  parent reply	other threads:[~2023-05-19 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 13:58 [PATCH 0/1] net: ioctl: Use kernel buffer on proto ioctl callbacks Breno Leitao
2023-05-19 13:58 ` [PATCH 1/1] net: ioctl: Use kernel memory on protocol " Breno Leitao
2023-05-19 14:22   ` David Laight
2023-05-19 15:09   ` Willem de Bruijn
2023-05-19 15:39     ` Breno Leitao
2023-05-19 17:04       ` Willem de Bruijn
2023-05-20 12:48         ` David Laight
2023-05-20 13:02     ` David Laight
2023-05-19 16:54   ` kernel test robot
2023-05-19 19:26   ` kernel test robot
2023-05-19 23:29   ` kernel test robot
2023-05-20  3:50   ` David Ahern
2023-05-19 15:15 ` Jakub Kicinski [this message]
2023-05-19 15:19   ` [PATCH 0/1] net: ioctl: Use kernel buffer on proto " Breno Leitao

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 \
    --in-reply-to=20230519081526.59411533@kernel.org \
    --to=kuba@kernel.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=alex.aring@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=courmisch@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dccp@vger.kernel.org \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=leit@fb.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /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