From: Johannes Berg <johannes@sipsolutions.net>
To: Maoyi Xie <maoyixie.tju@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH wireless] wifi: mac80211_hwsim: send config events to the radio's net namespace
Date: Fri, 04 Sep 2026 11:58:23 +0200 [thread overview]
Message-ID: <cbbf805aae72d8a605cff52a5264d1048a476f7c.camel@sipsolutions.net> (raw)
In-Reply-To: <20260809113908.2218030-1-maoyixie.tju@gmail.com> (sfid-20260809_133916_629664_627885BC)
On Sun, 2026-08-09 at 19:39 +0800, Maoyi Xie wrote:
> hwsim_mcast_config_msg() sends config notifications. Its info == NULL
> path uses genlmsg_multicast(), which delivers to init_net only. That
> path runs on an asynchronous radio destroy, from remove_user_radios() on
> a closed socket or hwsim_exit_net() on teardown.
How's any of that "where it runs" part useful?
> hwsim is per-namespace, and a radio records its namespace in wiphy_net()
> of its wiphy. A radio in a non-initial namespace therefore has its
> DEL_RADIO sent to init_net, with its id and name. An unprivileged
> listener there receives it, since the config group has no flags and
> needs no capability to join. The radio's own namespace is never told.
>
> Send to the radio's namespace with genlmsg_multicast_netns(), using
> wiphy_net() of its wiphy, the net the GET and DUMP filters already use.
>
> I found this with a static check for multicast that ignores the object's
> namespace. I reproduced it in a qemu VM as an unprivileged user, with no
> hardware and no kernel changes. A process creates a radio in its own
> namespace and exits. An init_net listener receives the DEL_RADIO before
> the patch, and nothing after it.
>
> hwsim is a test driver, so the leaked metadata is low value. The fix
> still matters, since the radio's own namespace should hear about it.
etc.
Please rewrite the commit message.
> Fixes: 100cb9ff40e0 ("mac80211_hwsim: Allow managing radios from non-initial namespaces")
> Cc: stable@vger.kernel.org
That doesn't really seem needed.
johannes
prev parent reply other threads:[~2026-09-04 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 11:39 Maoyi Xie
2026-09-04 9:58 ` Johannes Berg [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=cbbf805aae72d8a605cff52a5264d1048a476f7c.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=maoyixie.tju@gmail.com \
--cc=stable@vger.kernel.org \
/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®