Files
linux-stable-mirror/include/uapi/linux
Christoph Böhmwalder 8098eeb693 drbd: replace genl_magic with explicit netlink serialization
Replace the genl_magic multi-include macro system with explicit
serialization and parsing.

The *_gen files were initially produced from a YNL spec via a
customized ynl-gen-c, but the DRBD netlink family is effectively
frozen, so the generator is kept unmodified.
All new functionality will land in a separate, properly-designed
family.
Carry the resulting code as ordinary in-tree source rather than
landing the spec and generator changes that produced it.

The bulk of the changes are mechanical renames to fit the YNL naming
conventions:
  - Handler functions: drbd_adm_* -> drbd_nl_*_doit/dumpit
  - GENL_MAGIC_VERSION -> DRBD_FAMILY_VERSION
  - GENL_MAGIC_FAMILY_HDRSZ -> sizeof(struct drbd_genlmsghdr)
  - drbd_genl_family -> drbd_nl_family
  - Attribute IDs: T_* -> DRBD_A_*

Remove the nested_attr_tb static global buffer and move to a per-call
allocation approach: each deserialization manages its own nested
attribute table. This will be needed anyway when we eventually move
to parallel_ops, and it's actually simpler this way, so make the
move now.

Replace the functionality of the "sensitive" flag: this was only used
by a single field (shared_secret); open-code redaction logic for that
locally.

Also replace the "invariant" flag: this only had a couple of users,
and those basically never change. Hard code the check directly inline.

The genl_family struct itself is defined manually in drbd_nl.c.

Also replace a couple of drbd-specific wrappers (nla_put_u64_0pad,
drbd_nla_find_nested) with standard kernel functions while we're at
it.

Finally, completely remove the genl_magic system; DRBD was its only
user.

Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260506124541.1951772-3-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-05-08 19:23:23 -06:00
..
2026-03-30 16:55:36 +02:00
2026-03-05 22:16:08 -05:00
2026-03-19 11:38:24 -06:00
2026-03-18 09:59:57 +00:00
2026-03-05 16:26:52 +01:00
2026-01-18 11:22:53 -05:00
2025-10-28 22:59:19 +01:00
2025-11-25 19:20:42 -08:00
2025-11-24 17:52:11 +01:00
2025-11-24 17:52:11 +01:00
2025-11-29 21:39:58 +09:00
2025-12-23 12:29:14 +05:30
2026-01-12 16:52:09 +01:00
2026-03-12 13:33:54 +01:00
2026-02-06 20:35:06 -08:00
2026-04-09 18:21:45 -07:00
2026-02-27 19:21:56 -08:00
2025-11-03 17:41:18 +01:00
2025-11-25 19:20:42 -08:00
2026-03-31 07:04:00 -06:00
2026-01-26 19:07:10 -08:00
2026-02-09 12:21:32 -05:00
2025-11-30 18:02:43 -05:00