Netdev Archive on
help / color / mirror / Atom feed
From: Johannes Berg <>
Subject: [RFC 0/4] netlink: binary attribute range validation
Date: Wed,  5 Aug 2020 16:03:20 +0200	[thread overview]
Message-ID: <> (raw)


This is something I'd been thinking about for a while; we already
have NLA_MIN_LEN, NLA_BINARY (with a max len), and NLA_EXACT_LEN,
but in quite a few places (as you can see in the last patch here)
we need a range, and we already have a way to encode ranges for
integer ranges, so it's pretty easy to use that for binary length
ranges as well.

So at least for wireless this seems useful to save some code, and
to (mostly) expose the actual limits to userspace via the policy
export that we have now.

What do you think?


             reply	other threads:[~2020-08-05 20:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 14:03 Johannes Berg [this message]
2020-08-05 14:03 ` [RFC 1/4] netlink: consistently use NLA_POLICY_EXACT_LEN() Johannes Berg
2020-08-05 14:03 ` [RFC 2/4] netlink: consistently use NLA_POLICY_MIN_LEN() Johannes Berg
2020-08-05 14:03 ` [RFC 3/4] netlink: make NLA_BINARY validation more flexible Johannes Berg
2020-08-05 14:03 ` [RFC 4/4] nl80211: use NLA_POLICY_RANGE(NLA_BINARY, ...) for a few attributes Johannes Berg
2020-08-08 21:07 ` [RFC 0/4] netlink: binary attribute range validation David Miller

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [RFC 0/4] netlink: binary attribute range validation' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).