From: Denis Kenzior <denkenz@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Subject: Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
Date: Fri, 12 Aug 2016 11:24:05 -0500 [thread overview]
Message-ID: <57ADF825.5080409@gmail.com> (raw)
In-Reply-To: <1470981481.26902.4.camel@sipsolutions.net>
Hi Johannes,
>
> No, I don't see a fault in the logic. I just think it's misleading. You
> make the code look like it relies on filter_wiphy != 0, but then you go
> and treat filter_wiphy==0 as a valid case.
It relies on a sentry condition with all 3 variables being zero, not
just filter_wiphy. The original patch is about the most non-invasive
one I can come up with. Maybe a comment will alleviate any concerns?
Anyway, if you feel this is misleading, fair enough.
>
> In other places, like nl80211_prepare_wdev_dump(), we add 1 to the
> wiphy and subtract it again later to avoid exactly this. Perhaps you
> could do the same, and rely only on filter_wiphy instead of really
> relying only on wp_start/if_start.
Having looked at that particular piece of code, I ran away scared with
the conclusion that the cure is probably much worse than the disease :)
I posted a slightly different solution in v2. It is a bit more
invasive, but is more explicit in what is going on. I ran sanity checks
on it and it works as expected.
Regards,
-Denis
prev parent reply other threads:[~2016-08-12 16:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 22:02 [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered Denis Kenzior
2016-08-11 12:47 ` Johannes Berg
2016-08-11 16:38 ` Denis Kenzior
2016-08-11 18:03 ` Johannes Berg
2016-08-11 18:20 ` Denis Kenzior
2016-08-11 18:58 ` Arend Van Spriel
2016-08-11 19:05 ` Denis Kenzior
2016-08-11 21:22 ` Arend Van Spriel
2016-08-12 5:58 ` Johannes Berg
2016-08-12 16:24 ` Denis Kenzior [this message]
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=57ADF825.5080409@gmail.com \
--to=denkenz@gmail.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).