lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1y71b8q1d.fsf@frodo.ebiederm.org>
Date:	Sun, 28 Sep 2008 22:44:14 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Johannes Berg <johannes@...solutions.net>
Cc:	linux-wireless <linux-wireless@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>, Jouni Malinen <j@...fi>
Subject: Re: wireless vs. network namespaces (part II)


>> >  * ensure that all netdevs created for this wiphy will have the right
>> >    netns.
>> >
>> > The latter part I'm unsure on, alloc_netdev_mq seems to always use
>> > init_net so I can't put them into the right namespace to start with, but
>> > because they're all "in there together" I can't allow switching
>> > namespaces either.. Ideas?
>> 
>> alloc_netdev_mq doesn't register the device, so it is a matter of simply
>> changing the network device pointer after allocation and before registration.
>> 
>> We do this by default when we dynamically create network devices using
>> netlink.  see rtnl_create_link for an example.
>
> Ok. So I guess I'd want to write a wrapper for registering the netdev
> that puts it into the right namespace for the wireless hardware and sets
> the NETIF_F_NETNS_LOCAL flag.

> I'll have to experiment a bit I guess.

So you are looking at using NETIF_F_NETNS_LOCAL to indicate that you can't move
one of the devices?

There is an UNREGISTER_NETDEV event and a REGISTER_NETDEV event sent when a device
is moved between namespaces.  See:  dev_change_net_namespace.

I think you would want to look onto those and move one network device when you
move the other, without using NETIF_F_NETNS_LOCAL.

Deletion and creation we have definitely done with paired veth devices.  I haven't
looked at the migration case, but I with a little bit of guarding against recursion
it looks like it probably can be handled.  

Say trigger when your parnter device calls REGISTER_NETDEV in a different network
namespace?

Eric

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ