Subject: Re: [PATCH v2 0/2] wireless: Allow wiphy/hwsim management from user namespaces

From: Johannes Berg <[email-masked]>
Date: Thu, 12 May 2016 11:27:01 +0200

Hi Martin,

Thanks for the update.

I've applied your patch now, but I think we need to do some work around
the wmediumd abstraction.

Right now, you allowed HWSIM_CMD_REGISTER only from init_net, which is
mostly fine.

However, it means that a wmediumd running in init_net will see frames
from the radios that are generated by other namespace, but will have no
way to access anything else about them, neither through hwsim netlink
nor through nl80211 or sysfs.

So I think you should change the "wmediumd_portid" variable to live
in struct hwsim_net and then allow HWSIM_CMD_REGISTER to be done inside
the net namespace.

With that, and making the other few wmediumd related operations
namespace aware, we would be able to run wmediumd in any net namespace
and have it manage all the radios created in that namespace.

johannes