netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/13] genetlink: support per op type policies
@ 2022-10-18 23:07 Jakub Kicinski
  2022-10-18 23:07 ` [PATCH net-next 01/13] genetlink: refactor the cmd <> policy mapping dump Jakub Kicinski
                   ` (12 more replies)
  0 siblings, 13 replies; 46+ messages in thread
From: Jakub Kicinski @ 2022-10-18 23:07 UTC (permalink / raw)
  To: davem, johannes
  Cc: netdev, edumazet, pabeni, jiri, razor, nicolas.dichtel, gnault,
	jacob.e.keller, fw, Jakub Kicinski

While writing new genetlink families I was increasingly annoyed by the fact
that we don't support different policies for do and dump callbacks.
This makes it hard to do proper input validation for dumps which usually
have a lot more narrow range of accepted attributes.

There is also a minor inconvenience of not supporting different per_doit
and post_doit callbacks per op.

This series addresses those problems by introducing another op format.

Jakub Kicinski (13):
  genetlink: refactor the cmd <> policy mapping dump
  genetlink: move the private fields in struct genl_family
  genetlink: introduce split op representation
  genetlink: load policy based on validation flags
  genetlink: check for callback type at op load time
  genetlink: add policies for both doit and dumpit in
    ctrl_dumppolicy_start()
  genetlink: support split policies in ctrl_dumppolicy_put_op()
  genetlink: inline genl_get_cmd()
  genetlink: add iterator for walking family ops
  genetlink: use iterator in the op to policy map dumping
  genetlink: inline old iteration helpers
  genetlink: allow families to use split ops directly
  genetlink: convert control family to split ops

 include/net/genetlink.h   |  76 ++++++-
 net/batman-adv/netlink.c  |   6 +-
 net/core/devlink.c        |   4 +-
 net/core/drop_monitor.c   |   4 +-
 net/ieee802154/nl802154.c |   6 +-
 net/netlink/genetlink.c   | 461 ++++++++++++++++++++++++++++----------
 net/wireless/nl80211.c    |   6 +-
 7 files changed, 426 insertions(+), 137 deletions(-)

-- 
2.37.3


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

end of thread, other threads:[~2022-10-21 15:01 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 23:07 [PATCH net-next 00/13] genetlink: support per op type policies Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 01/13] genetlink: refactor the cmd <> policy mapping dump Jakub Kicinski
2022-10-19  7:50   ` Johannes Berg
2022-10-19 15:59     ` Jakub Kicinski
2022-10-19 21:20       ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 02/13] genetlink: move the private fields in struct genl_family Jakub Kicinski
2022-10-19  7:51   ` Johannes Berg
2022-10-19 21:21   ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 03/13] genetlink: introduce split op representation Jakub Kicinski
2022-10-19  7:59   ` Johannes Berg
2022-10-19 19:14     ` Jakub Kicinski
2022-10-19 19:36       ` Johannes Berg
2022-10-19 19:50         ` Jakub Kicinski
2022-10-19 21:28         ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 04/13] genetlink: load policy based on validation flags Jakub Kicinski
2022-10-19  8:01   ` Johannes Berg
2022-10-19 19:20     ` Jakub Kicinski
2022-10-19 19:33       ` Johannes Berg
2022-10-19 19:49         ` Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 05/13] genetlink: check for callback type at op load time Jakub Kicinski
2022-10-19 21:33   ` Jacob Keller
2022-10-19 21:45     ` Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 06/13] genetlink: add policies for both doit and dumpit in ctrl_dumppolicy_start() Jakub Kicinski
2022-10-19  8:08   ` Johannes Berg
2022-10-19 19:22     ` Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 07/13] genetlink: support split policies in ctrl_dumppolicy_put_op() Jakub Kicinski
2022-10-19 21:38   ` Jacob Keller
2022-10-19 21:46     ` Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 08/13] genetlink: inline genl_get_cmd() Jakub Kicinski
2022-10-19 21:46   ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 09/13] genetlink: add iterator for walking family ops Jakub Kicinski
2022-10-19 21:49   ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 10/13] genetlink: use iterator in the op to policy map dumping Jakub Kicinski
2022-10-19 21:53   ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 11/13] genetlink: inline old iteration helpers Jakub Kicinski
2022-10-19 22:15   ` Jacob Keller
2022-10-18 23:07 ` [PATCH net-next 12/13] genetlink: allow families to use split ops directly Jakub Kicinski
2022-10-19  8:15   ` Johannes Berg
2022-10-19 19:25     ` Jakub Kicinski
2022-10-19 19:37       ` Johannes Berg
2022-10-19 19:57         ` Jakub Kicinski
2022-10-20  7:32           ` Johannes Berg
2022-10-20 18:09             ` Jakub Kicinski
2022-10-21 11:02               ` Johannes Berg
2022-10-21 15:01                 ` Jakub Kicinski
2022-10-18 23:07 ` [PATCH net-next 13/13] genetlink: convert control family to split ops Jakub Kicinski

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