[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <010cbb5d1c7944aba628a15774bef941@AcuMS.aculab.com>
Date: Mon, 21 Nov 2022 16:12:53 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'James Bottomley' <James.Bottomley@...senPartnership.com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
CC: Matthew Garrett <mjg59@...f.ucam.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
Nayna <nayna@...ux.vnet.ibm.com>,
"Andrew Donnellan" <ajd@...ux.ibm.com>,
Nayna Jain <nayna@...ux.ibm.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"npiggin@...il.com" <npiggin@...il.com>,
Dov Murik <dovmurik@...ux.ibm.com>,
Dave Hansen <dave.hansen@...el.com>,
linux-security-module <linux-security-module@...r.kernel.org>,
Paul Mackerras <paulus@...ba.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"George Wilson" <gcwilson@...ux.ibm.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Stefan Berger <stefanb@...ux.ibm.com>
Subject: RE: [PATCH 2/4] fs: define a firmware security filesystem named
fwsecurityfs
From: James Bottomley
> Sent: 21 November 2022 14:03
...
> > Then how does the networking code handle the namespace stuff in
> > sysfs?
> > That seems to work today, or am I missing something?
>
> have you actually tried?
>
> jejb@...grow:~> sudo unshare --net bash
> lingrow:/home/jejb # ls /sys/class/net/
> lo tun0 tun10 wlan0
> lingrow:/home/jejb # ip link show
> 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
> default qlen 1000
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>
> So, as you see, I've entered a network namespace and ip link shows me
> the only interface I can see in that namespace (a down loopback) but
> sysfs shows me every interface on the system outside the namespace.
You have to remount /sys to get the restricted copy.
eg by running 'ip netns exec namespace command'.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists