From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
pablo@netfilter.org, dsa@cumulusnetworks.com
Subject: Re: [PATCH 0/6] stricter netlink validation
Date: Thu, 04 Apr 2019 22:20:20 +0200 [thread overview]
Message-ID: <a432ffb79a23dcc9276cdec15f156189de4518ea.camel@sipsolutions.net> (raw)
In-Reply-To: <20190404.102850.631122626573856353.davem@davemloft.net>
On Thu, 2019-04-04 at 10:28 -0700, David Miller wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> Date: Thu, 4 Apr 2019 08:54:02 +0200
>
> > Here's a version that has passed build testing ;-)
>
> :-)
Actually it passed more than that - I did test the nl80211 bits etc.,
but I hadn't build-tested everything before so some missing function
renames were caught by the full build testing.
> I really like the approach taken here, and done in such a way that
> new attributes added get strict checking by default.
It's two things really
* new commands (aka new instances of nla_parse/nlmsg_parse and friends)
--> strict checking for everything, including existing attributes
because we reason that you're writing some new userspace code,
and even if that might use some existing functionality, which
might even be wrong, you're going to fix it here
* new attributes on existing commands (in the policy)
--> can be set up (with the strict_start_type from patch 4) to be
strictly checked
> I'll let David Ahern et al. have time to review this.
Sure.
FWIW, I wasn't really entirely sure I liked doing a cross-tree rename,
but ultimately I felt that we should discourage uses of what I now
called *_deprecated() and *_strict_deprecated() APIs, and having sort of
the "default" names do the thing we believe is right (strict checking)
helps with that - in a sort of 'social engineering' way, people will not
want to type out "_deprecated" all the time ;-)
I do realize that this may be a bit controversial and am certainly open
to other suggestions on this.
Similarly, I engineered the generic netlink stuff in a way that adding
non-strict behaviour needs extra work, so that hopefully new stuff will
not do that extra work.
Also, both of these are then easier to see in reviews, since you can see
"deprecated" in the function names, or "DONT_VALIDATE" in the generic
netlink things.
johannes
next prev parent reply other threads:[~2019-04-04 20:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 6:54 [PATCH 0/6] stricter netlink validation Johannes Berg
2019-04-04 6:54 ` [PATCH 1/6] netlink: add NLA_MIN_LEN Johannes Berg
2019-04-04 6:54 ` [PATCH 2/6] netlink: make validation more configurable for future strictness Johannes Berg
2019-04-10 16:55 ` David Ahern
2019-04-12 9:43 ` Johannes Berg
2019-04-04 6:54 ` [PATCH 3/6] netlink: re-add parse/validate functions in strict mode Johannes Berg
2019-04-04 6:54 ` [PATCH 4/6] netlink: add strict parsing for future attributes Johannes Berg
2019-04-05 15:22 ` Nicolas Dichtel
2019-04-05 15:31 ` Johannes Berg
2019-04-05 15:40 ` Nicolas Dichtel
2019-04-04 6:54 ` [PATCH 5/6] genetlink: optionally validate strictly/dumps Johannes Berg
2019-04-04 6:54 ` [PATCH 6/6] nl80211: tag policies with strict_start_type Johannes Berg
2019-04-04 17:28 ` [PATCH 0/6] stricter netlink validation David Miller
2019-04-04 20:20 ` Johannes Berg [this message]
2019-04-05 2:44 ` David Ahern
2019-04-05 7:09 ` Johannes Berg
2019-04-05 11:47 ` Johannes Berg
2019-04-05 15:13 ` Johannes Berg
2019-04-08 9:00 ` Leon Romanovsky
2019-04-08 9:01 ` 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=a432ffb79a23dcc9276cdec15f156189de4518ea.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.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