From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Anil Kaushik <anilkaushikwireless@gmail.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, idosch@nvidia.com,
willemb@google.com, jacob.e.keller@intel.com, jiri@resnulli.us,
fw@strlen.de, martineau@kernel.org, v3rdant.xiang@gmail.com,
aliceryhl@google.com, linux-kernel@vger.kernel.org,
nhorman@tuxdriver.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net v10 2/2] selftests: net: test joining genetlink groups no family owns
Date: Mon, 30 Nov 2026 11:37:27 +0100 [thread overview]
Message-ID: <57feb920-02ca-4e10-b35e-4234f5bbc0ee@6wind.com> (raw)
In-Reply-To: <20261127032246.2886407-3-anilkaushikwireless@gmail.com>
Le 27/11/2026 à 04:22, Anil Kaushik a écrit :> Check that a Generic Netlink
group ID no family owns cannot be joined:
>
> - setsockopt(NETLINK_ADD_MEMBERSHIP) on a free ID fails with ENOENT,
> and still works on an owned group.
> - bind() with a mask of free IDs succeeds and joins nothing. With an
> owned group in the mask, it joins only that group.
> - A socket bound to the free IDs is not a member of the NET_DM groups
> after drop_monitor is loaded. The test unloads drop_monitor again
> after it loaded it. Skipped when NET_DM is already registered or
> drop_monitor is not available.
>
> The free IDs are found with a family dump, which only lists the families
> of the current network namespace, so these checks are skipped outside
> the initial one. It is found with its fixed nsfs inode number, which
> also works in a container with its own PID namespace. Kernels before
> v6.17 do not have that number, so the checks are skipped there too.
>
> Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Signed-off-by: Anil Kaushik <anilkaushikwireless@gmail.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
prev parent reply other threads:[~2026-11-30 10:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 3:22 [PATCH net v10 0/2] genetlink: Reject joining multicast " Anil Kaushik
2026-11-27 3:22 ` [PATCH net v10 1/2] " Anil Kaushik
2026-11-30 10:27 ` Nicolas Dichtel
2026-11-27 3:22 ` [PATCH net v10 2/2] selftests: net: test joining genetlink " Anil Kaushik
2026-11-30 10:37 ` Nicolas Dichtel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57feb920-02ca-4e10-b35e-4234f5bbc0ee@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=aliceryhl@google.com \
--cc=anilkaushikwireless@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=v3rdant.xiang@gmail.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®