[PATCH net-next v1] net: devmem: document that bind-tx is unprivileged by design
From: Mina Almasry
Date: Mon Sep 21 2026 - 15:56:36 EST
Unlike bind-rx, which configures shared NIC RX queues to steer incoming
traffic into the caller's dmabuf and requires CAP_NET_ADMIN
(uns-admin-perm), bind-tx only DMA-maps the caller's dmabuf so the caller
can transmit from it on their own sockets without affecting other traffic
or device configuration.
Add a comment in netdev.yaml and above netdev_nl_bind_tx_doit() to make it
explicit that NETDEV_CMD_BIND_TX is unprivileged by design.
Signed-off-by: Mina Almasry <almasrymina@xxxxxxxxxx>
---
Documentation/netlink/specs/netdev.yaml | 2 ++
net/core/netdev-genl.c | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
index e13461cf3fc33..4303593e5003c 100644
--- a/Documentation/netlink/specs/netdev.yaml
+++ b/Documentation/netlink/specs/netdev.yaml
@@ -852,6 +852,8 @@ operations:
name: bind-tx
doc: Bind dmabuf to netdev for TX
attribute-set: dmabuf
+ # Intentionally unprivileged (no admin-perm / uns-admin-perm); see
+ # comment above netdev_nl_bind_tx_doit().
do:
request:
attributes:
diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
index fa9edfdb32c29..690c27f63d260 100644
--- a/net/core/netdev-genl.c
+++ b/net/core/netdev-genl.c
@@ -1180,6 +1180,12 @@ netdev_find_netmem_tx_dev(struct net_device *dev)
return NULL;
}
+/* Note: NETDEV_CMD_BIND_TX is intentionally unprivileged (no
+ * GENL_ADMIN_PERM / GENL_UNS_ADMIN_PERM). Unlike bind-rx, which configures
+ * shared NIC RX queues, bind-tx only DMA-maps the caller's dmabuf so they can
+ * transmit from it on their own sockets without affecting other traffic or
+ * device state.
+ */
int netdev_nl_bind_tx_doit(struct sk_buff *skb, struct genl_info *info)
{
struct net_devmem_dmabuf_binding *binding;
base-commit: 8830e65ed46de41f849eefb8ba227d4852c460f6
--
2.55.0.1082.g2b9226bbc0-goog