linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Andrew Zaborowski <andrew.zaborowski@intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH][RFC] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT
Date: Mon, 5 Dec 2016 09:32:50 -0600	[thread overview]
Message-ID: <584588A2.9090006@gmail.com> (raw)
In-Reply-To: <1480950886.31788.44.camel@sipsolutions.net>

Hi Johannes,

On 12/05/2016 09:14 AM, Johannes Berg wrote:
>>> Well, no, that'd only work with an open connection :)
>
> Actually, it also works fairly easily for when firmware has 4-way-
> handshake offload, which will be coming to a kernel near you soon.
>

Great, but still not applicable for all devices, and still questionable 
how useful an unmanaged connection actually is.  But okay.

>> And even that is questionable in my mind for some of the more
>> advanced cases.
>
> Well, at least in that case you can have things running (for a while)
> if the manager crashes?
>

To what purpose?  That's like saying that maybe a socket should be kept 
open in case an application crashes.

>> But I'm not sure what your point is, do you still have objections to
>> this approach?
>
> Well, first of all, you can keep things running, at least until you've
> figured out how to restart wpa_supplicant/whatever.
>
> There also aren't really any important resources to clear when
> userspace dies, at least nothing that userspace can't trivially clear
> later by disconnecting (even unconditionally and ignoring the
> result)...

Sure, but in the meantime you have a completely unmanaged connection, 
with no connection manager to tell you what the state of it is.  Maybe 
okay for a command line system with a brain in front of it, but not much 
use anywhere else.

But for that use case the SOCKET_OWNER attribute can be omitted...

>
> So basically I just don't see the advantage. It feels like trading a
> single line of userspace code to disconnect with some (not super
> complex, but still somewhat involved) kernel-side tracking. That
> doesn't really seem like a worthwhile tradeoff to me.
>

Well, we'd be trading quite a bit of race-prone user space code that 
performs the clean up on start up for one line of attributes.  I call 
that a good trade.

Also, I thought it was good form / the UNIX way to clean up after 
processes exit ungracefully.  You seem to be arguing against that?  I 
would argue the kernel should be doing the opposite.  It should always 
clean up the connection unless user space has indicated it can be 'reused'.

Regards,
-Denis

  reply	other threads:[~2016-12-05 15:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 20:56 [PATCH][RFC] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT Andrew Zaborowski
2016-12-05 13:51 ` Johannes Berg
2016-12-05 14:55   ` Denis Kenzior
2016-12-05 14:58     ` Johannes Berg
2016-12-05 15:05       ` Denis Kenzior
2016-12-05 15:14         ` Johannes Berg
2016-12-05 15:32           ` Denis Kenzior [this message]
2016-12-06  7:16             ` Johannes Berg
2016-12-06 21:42               ` Denis Kenzior
2016-12-07  1:40                 ` Andrew Zaborowski
2016-12-07  6:19                   ` Johannes Berg
2016-12-07  9:49                     ` Andrew Zaborowski
2016-12-07  6:15                 ` Johannes Berg
2016-12-07  6:40                   ` Denis Kenzior
2016-12-07  6:48                     ` Johannes Berg
2016-12-07  7:07                       ` Denis Kenzior
2016-12-07  7:38                         ` Johannes Berg
2016-12-05 15:40           ` Marcel Holtmann

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=584588A2.9090006@gmail.com \
    --to=denkenz@gmail.com \
    --cc=andrew.zaborowski@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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).