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: <20080501151051.GB16038@sergelap.austin.ibm.com>
Date:	Thu, 1 May 2008 10:10:51 -0500
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Greg KH <gregkh@...e.de>
Cc:	"Serge E. Hallyn" <serue@...ibm.com>,
	Benjamin Thery <benjamin.thery@...l.net>,
	linux-kernel@...r.kernel.org, Al Viro <viro@....linux.org.uk>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Tejun Heo <htejun@...il.com>,
	Daniel Lezcano <dlezcano@...ibm.com>,
	Pavel Emelyanov <xemul@...nvz.org>, netdev@...r.kernel.org
Subject: Re: [PATCH 00/10] sysfs tagged directories

Quoting Greg KH (gregkh@...e.de):
> On Tue, Apr 29, 2008 at 02:34:17PM -0500, Serge E. Hallyn wrote:
> > Finally, to give an idea about how the trees end up looking, here is
> > what I just did on my test box;
> > 
> > /usr/sbin/ip link add type veth
> > mount --bind /mnt /mnt
> > mkdir /mnt/sys
> > mount --make-shared /mnt
> > ns_exec -cmn /bin/sh  # unshare netns and mounts ns
> >  # At this point, I still see eth0 and friends under /sys/class/net etc
> > mount -t sysfs none /sys
> >  # At this point, /sys/class/net has only lo0 and sit0, and
> >  # /sys/devices/pci0000:00/0000:00:03.0/net:eth0 is a dead link
> > mount --bind /sys /mnt/sys
> > echo $$
> > 	3050
> > 
> > (back in another shell):
> > /usr/sbin/ip link set veth1 netns 3050
> > 
> > (back in container shell):
> > /usr/sbin/ip link set veth1 name eth0
> >  # Now /sys/devices/pci0000:00/0000:00:03.0/net:eth0 is a live link to
> >  # the /sys/class/net/eth0 which is really the original veth1
> > exit
> > 
> > ls /mnt/sys/class/net
> >  # empty directory
> 
> What does this all look like without CONFIG_SYSFS_DEPRECATED enabled,
> which is what all sane distros do these days.  That's going to change
> the look of the tree for stuff like this a lot I think...
> 
> thanks,
> 
> greg k-h

Now before moving veth1 to the new netns, we have in the container:
/sys/class/net:
lo  sit0

/sys/devices/virtual/net:
lo  sit0

and after moving veth1, we have in the container:

/sys/class/net:
lo  sit0  veth1

/sys/devices/virtual/net:
lo  sit0

In the parent network namespace, veth1 is removed from /sys/class/net
but remains in /sys/devices/virtual/net.

I'm not sure whether this is the renaming bug that Daniel Lezcano's
patch addresses.  If not (as I suspect) then that clearly needs to be
fixed.

Benjamin can you play around with this and test it with Daniel's
patch?

thanks,
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ