Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC 0/4] netlink: binary attribute range validation
@ 2020-08-05 14:03 Johannes Berg
  2020-08-05 14:03 ` [RFC 1/4] netlink: consistently use NLA_POLICY_EXACT_LEN() Johannes Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Johannes Berg @ 2020-08-05 14:03 UTC (permalink / raw)
  To: linux-wireless, netdev

Hi,

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?

johannes



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-08 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 14:03 [RFC 0/4] netlink: binary attribute range validation Johannes Berg
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

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