Netdev List
 help / color / mirror / Atom feed
From: Cong Wang <cwang@multikernel.io>
To: John Ericson <mail@johnericson.me>
Cc: network dev <netdev@vger.kernel.org>
Subject: Re: [RFC] connectat()/bindat() or an alternative design
Date: Mon, 8 Jun 2026 12:45:13 -0700	[thread overview]
Message-ID: <aicbyQIC2qEveNd-@pop-os.localdomain> (raw)
In-Reply-To: <b1af80fc-a57c-408d-bdfe-fa6bae26eaca@app.fastmail.com>

Hi John,

On Mon, May 18, 2026 at 03:09:43PM -0400, John Ericson wrote:
> Hello, I am interested in seeing something like the BSD's connectat/bindat in
> Linux.
> 
> The deficiencies with traditional `bind`/`connect` for unix sockets are
> well-known. The advantages of openat2 over openat over open are also well-known, so I
> won't waste anyone's time restating either.
> 
> https://lore.kernel.org/netdev/4FCF171B.8000207@parallels.com/
> https://lore.kernel.org/all/CAEnbY+co6YLXANfeMnfBOBs8Ba_Sbdqz0Ahm8RzAhRF7MrxL4Q@mail.gmail.com/
> 
> Here are two previous times this was raised, unfortunately with no replies.
> Hoping this third time is the charm!
> 
> To hopefully give the discussion a bit more concreteness, I have taken a stab at
> two refactors (with an LLM, full disclosure) to get a sense of what the
> approaches look like. (To be clear, these are not patches I am trying to
> formally submit, these are just sketches to guide the conversation. I haven't
> built or tested them, just read them.)
> 

Thanks for bringing this up.

I have no doubt connectat()/bindat() helps closing TOCTOU for Unix
sockets. However, it would be nicer to describe your use case here,
especially what the problems are without it. This would help more to
jusify your proposal here than just getting aligned with openat() or
BSD.

Hope this helps.

Regards,
Cong

  reply	other threads:[~2026-06-08 19:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 19:09 [RFC] connectat()/bindat() or an alternative design John Ericson
2026-06-08 19:45 ` Cong Wang [this message]
2026-06-11  2:08   ` John Ericson
2026-06-12 18:50     ` Cong Wang

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=aicbyQIC2qEveNd-@pop-os.localdomain \
    --to=cwang@multikernel.io \
    --cc=mail@johnericson.me \
    --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