linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Denis Kenzior <denkenz@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: [RFCv2 1/4] nl80211: Fix broken non-split wiphy dumps
Date: Fri, 30 Aug 2019 11:53:36 +0200	[thread overview]
Message-ID: <3d2b8edaaf51ec96bf3983c8a14922e30f419ff3.camel@sipsolutions.net> (raw)
In-Reply-To: <ec3b9fd84fb8c5d333445d872bb0f864a4655a6b.camel@sipsolutions.net> (sfid-20190830_114008_989593_CFB8ED94)

On Fri, 2019-08-30 at 11:40 +0200, Johannes Berg wrote:
> On Fri, 2019-08-30 at 11:10 +0200, Johannes Berg wrote:
> > On Fri, 2019-08-30 at 11:03 +0200, Johannes Berg wrote:
> > > On Fri, 2019-08-16 at 14:27 -0500, Denis Kenzior wrote:
> > > > If a (legacy) client requested a wiphy dump but did not provide the
> > > > NL80211_ATTR_SPLIT_WIPHY_DUMP attribute, the dump was supposed to be
> > > > composed of purely non-split NEW_WIPHY messages, with 1 wiphy per
> > > > message.  At least this was the intent after commit:
> > > > 3713b4e364ef ("nl80211: allow splitting wiphy information in dumps")
> > > > 
> > > > However, in reality the non-split dumps were broken very shortly after.
> > > > Perhaps around commit:
> > > > fe1abafd942f ("nl80211: re-add channel width and extended capa advertising")
> > > 
> > > Fun. I guess we updated all userspace quickly enough to not actually
> > > have any issues there. As far as I remember, nobody ever complained, so
> > > I guess people just updated their userspace.
> > 
> > Actually, going back in time to the code there (e.g. iw and hostap), it
> > seems that it quite possibly never was a userspace issue, just an issue
> > with netlink allocating a 4k SKB by default for dumps.
> > 
> > Even then, libnl would've defaulted to a 16k recvmsg() buffer size, and
> > we didn't override that anywhere.
> 
> Ah, also not quite true, at the time it still had a 4k default, until
> commit 807fddc4cd9e ("nl: Increase receive buffer size to 4 pages")
> dated May 8, 2013.

However, even before that, it would have supported responding to
MSG_TRUNC by retrying the recvmsg(), but hostap/iw wouldn't have set
nl_socket_enable_msg_peek()... oh well.

johannes


  reply	other threads:[~2019-08-30  9:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 19:27 [RFCv2 1/4] nl80211: Fix broken non-split wiphy dumps Denis Kenzior
2019-08-16 19:27 ` [RFCv2 2/4] nl80211: Support >4096 byte NEW_WIPHY event nlmsg Denis Kenzior
2019-08-30  9:36   ` Johannes Berg
2019-08-30 19:56     ` Denis Kenzior
2019-08-16 19:27 ` [RFCv2 3/4] nl80211: Don't split-dump for clients with large buffers Denis Kenzior
2019-08-16 19:27 ` [RFCv2 4/4] nl80211: Send large new_wiphy events Denis Kenzior
2019-08-30 10:14   ` Johannes Berg
2019-08-30 15:53     ` Denis Kenzior
2019-08-30  9:03 ` [RFCv2 1/4] nl80211: Fix broken non-split wiphy dumps Johannes Berg
2019-08-30  9:10   ` Johannes Berg
2019-08-30  9:40     ` Johannes Berg
2019-08-30  9:53       ` Johannes Berg [this message]
2019-08-30 16:32   ` Denis Kenzior

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=3d2b8edaaf51ec96bf3983c8a14922e30f419ff3.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=denkenz@gmail.com \
    --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).