linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Minor <james.minor@ni.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Xander Huff <xander.huff@ni.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	joseph.hershberger@ni.com, ben.shelton@ni.com,
	jaeden.amero@ni.com, joshc@ni.com, rich.tollerton@ni.com,
	brad.mouring@ni.com
Subject: Re: [PATCH RFC] wext: Add event stream wrappers that return E2BIG when values don't fit
Date: Thu, 19 Feb 2015 15:31:11 -0600	[thread overview]
Message-ID: <54E6561F.4050109@ni.com> (raw)
In-Reply-To: <1422566529.6322.26.camel@sipsolutions.net>

On 01/29/2015 03:22 PM, Johannes Berg wrote:

> > What you mean is "with the wext (compatibility) code in cfg80211".

Comment fixed in the v2 of the patch (coming shortly).

> > Either way, I *strongly* recommend against using this in the first
> > place. There's an upper bound of 64k (I think) on the amount of memory
> > that can be used, and people have been known to run into this limit - at
> > which point you get absolutely no scan results back whatsoever. It's far
> > safer to use nl80211's scan dump, and if you're looking at this code in
> > particular then clearly you have it available.

Agreed, and we will be switching to nl80211 as soon as we can.

> > Regarding the patch itself, it seems to add a bit much code. Is there
> > really no better way to express this? Perhaps by checking that the
> > stream actually moved forward - which will *always* happen for any of
> > these functions if they actually did anything? Even maybe if the new
> > _check inlines were to do that it'd still make the code smaller.

I've shuffled some things around and will submit the v2 momentarily.


Thanks,
James


  reply	other threads:[~2015-02-19 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 21:04 [PATCH RFC] wext: Add event stream wrappers that return E2BIG when values don't fit Xander Huff
2015-01-29 21:22 ` Johannes Berg
2015-02-19 21:31   ` James Minor [this message]
2015-02-19 21:42     ` [PATCH v2] wext: Return -E2BIG when the buffer is too small for the full scan results, including IEs James Minor
2015-02-23 15:57       ` Johannes Berg
2015-02-24 18:58         ` [PATCH v3] " James Minor
2015-02-25 10:34           ` Johannes Berg

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=54E6561F.4050109@ni.com \
    --to=james.minor@ni.com \
    --cc=ben.shelton@ni.com \
    --cc=brad.mouring@ni.com \
    --cc=davem@davemloft.net \
    --cc=jaeden.amero@ni.com \
    --cc=johannes@sipsolutions.net \
    --cc=joseph.hershberger@ni.com \
    --cc=joshc@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rich.tollerton@ni.com \
    --cc=xander.huff@ni.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;
as well as URLs for NNTP newsgroup(s).