Re: [PATCH net-next v2 0/2] net: devmem: allow bind-rx from non-init user namespaces
From: Stanislav Fomichev <hidden>
Date: 2026-06-03 14:56:43
Also in:
linux-kselftest, lkml
From: Stanislav Fomichev <hidden>
Date: 2026-06-03 14:56:43
Also in:
linux-kselftest, lkml
On 06/02, Bobby Eshleman wrote:
NETDEV_CMD_BIND_RX is GENL_ADMIN_PERM, which checks CAP_NET_ADMIN against init_user_ns. With netkit and netns support for devmem, it is now useful to let workloads holding CAP_NET_ADMIN only in their own user_ns issue bind-rx for a netns owned by that user_ns. The first patch switches the flag to GENL_UNS_ADMIN_PERM so the check uses the target netns's owning user_ns. Init remains permitted. The second patch just adds test cases. They are identical to nk_devmem.py tests, but using a non-init userns. Signed-off-by: Bobby Eshleman <redacted> --- Changes in v2: - some pylint fixes - fixed import issue - Link to v1: https://lore.kernel.org/all/20260601-nl-prov-v1-0-9bc57d6ca3f3@meta.com/ (local)
Acked-by: Stanislav Fomichev <sdf@fomichev.me>