netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: netdev <netdev@vger.kernel.org>, "hare@suse.com" <hare@suse.com>,
	David Howells <dhowells@redhat.com>,
	Olga Kornievskaia <kolga@netapp.com>,
	"jmeneghi@redhat.com" <jmeneghi@redhat.com>,
	Benjamin Coddington <bcodding@redhat.com>,
	Jeff Layton <jlayton@redhat.com>
Subject: Re: [PATCH v2 2/3] net/handshake: Add support for PF_HANDSHAKE
Date: Mon, 30 Jan 2023 20:35:26 -0800	[thread overview]
Message-ID: <20230130203526.52738cba@kernel.org> (raw)
In-Reply-To: <860B3B8A-1322-478E-8BF9-C5A3444227F7@oracle.com>

On Sat, 28 Jan 2023 14:06:49 +0000 Chuck Lever III wrote:
> > On Jan 28, 2023, at 3:32 AM, Jakub Kicinski <kuba@kernel.org> wrote:
> > On Thu, 26 Jan 2023 11:02:22 -0500 Chuck Lever wrote:  
> >> I've designed a way to pass a connected kernel socket endpoint to
> >> user space using the traditional listen/accept mechanism. accept(2)
> >> gives us a well-worn building block that can materialize a connected
> >> socket endpoint as a file descriptor in a specific user space
> >> process. Like any open socket descriptor, the accepted FD can then
> >> be passed to a library such as GnuTLS to perform a TLS handshake.  
> > 
> > I can't bring myself to like the new socket family layer.  
> 
> poll/listen/accept is the simplest and most natural way of
> materializing a socket endpoint in a process that I can think
> of. It's a well-understood building block. What specifically
> is troubling you about it?

poll/listen/accept yes, but that's not the entire socket interface. 
Our overall experience with the TCP ULPs is rather painful, proxying
all the other callbacks here may add another dimension.

Also I have a fear (perhaps unjustified) of reusing constructs which are
cornerstones of the networking stack and treating them as abstractions.

> > I'd like a second opinion on that, if anyone within netdev
> > is willing to share..  
> 
> Hopefully that opinion comes with an alternative way of getting
> a connected kernel socket endpoint up to user space without
> race issues.

If the user application decides the fd, wouldn't that solve the problem
in netlink?

  kernel                          user space

   notification     ---------->
 (new connection awaits)

                    <----------
                                  request (target fd=100)

                    ---------->
   reply
 (fd 100 is installed;
  extra params)

> We need to make some progress on this. If you don't have a
> technical objection, I think we should go with this with the
> idea that eventually something more palatable will come along
> to replace it.

  reply	other threads:[~2023-01-31  4:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 16:02 [PATCH v2 0/3] Another crack at a handshake upcall mechanism Chuck Lever
2023-01-26 16:02 ` [PATCH v2 1/3] net: Add an AF_HANDSHAKE address family Chuck Lever
2023-01-26 16:02 ` [PATCH v2 2/3] net/handshake: Add support for PF_HANDSHAKE Chuck Lever
2023-01-28  8:32   ` Jakub Kicinski
2023-01-28 14:06     ` Chuck Lever III
2023-01-31  4:35       ` Jakub Kicinski [this message]
2023-01-31 15:18         ` Chuck Lever III
2023-01-31 19:30           ` Jakub Kicinski
2023-01-31 19:34             ` Chuck Lever III
2023-01-31 20:23               ` Marcel Holtmann
2023-01-31 20:26               ` Benjamin Coddington
2023-01-28 17:40     ` Stephen Hemminger
2023-01-29 16:53       ` Chuck Lever III
2023-01-29 16:21     ` Hannes Reinecke
2023-01-30 13:44       ` Marcel Holtmann
2023-01-30 15:00         ` Chuck Lever III
2023-01-31  7:40         ` Hannes Reinecke
2023-01-31 14:17           ` Marcel Holtmann
2023-01-31 14:47             ` Hannes Reinecke
2023-01-31 20:32               ` Marcel Holtmann
2023-02-01  7:09                 ` Hannes Reinecke
2023-02-02 17:13             ` Xin Long
2023-02-02 17:32               ` Hannes Reinecke
2023-01-26 16:02 ` [PATCH v2 3/3] net/tls: Support AF_HANDSHAKE in kTLS Chuck Lever

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=20230130203526.52738cba@kernel.org \
    --to=kuba@kernel.org \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=hare@suse.com \
    --cc=jlayton@redhat.com \
    --cc=jmeneghi@redhat.com \
    --cc=kolga@netapp.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).