From: Greg KH <gregkh@suse.de>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org
Subject: Re: Converting network devices from class devices causes namespace pollution
Date: Sun, 18 Feb 2007 11:46:41 -0800 [thread overview]
Message-ID: <20070218194641.GA9929@suse.de> (raw)
In-Reply-To: <m1lkiv8npz.fsf@ebiederm.dsl.xmission.com>
On Sun, Feb 18, 2007 at 08:55:20AM -0700, Eric W. Biederman wrote:
>
> I believe the culprit is 43cb76d91ee85f579a69d42bc8efc08bac560278.
>
> For some reason network devices are now showing up under the pci
> device tree, in directories that have something other than network
> devices.
>
> # ls -l /sys/class/net/eth0
> lrwxrwxrwx 1 root root 0 Feb 17 23:19 /sys/class/net/eth0 -> ../../devices/pci0000:00/0000:00:0a.0/eth0
>
> # ls /sys/devices/pci0000\:00/0000\:00\:0a.0/
> broken_parity_status device eth0 modalias resource subsystem uevent
> class driver irq msi_bus resource0 subsystem_device vendor
> config enable local_cpus power resource1 subsystem_vendor
That's the PCI device directory where eth0 is attached to, what is wrong
with that?
> User space is allowed to rename network devices to anything any name
> not currently taken by another network device.
>
> However when I now do something like:
>
> ip link set eth0 name irq
>
> The rename half happens (because it is legal), but sysfs can't support
> it because of the ridiculous directory eth0 is in. After that
> point things go hideously wrong.
What goes wrong? What is not renamed properly?
Oh, you can't rename it to something like "irq". Well that's pretty
foolish on your behalf :)
> The current situation is hideous namespace pollution, and breaks user
> space, and is only likely only a matter of time before we have a
> reasonable instead of an strained conflict of names.
Do we really have a problem here?
> Is there any simple fix or do we need to revert the change away
> from class_device?
We need the class_device change to get suspend/resume working properly,
and to make a lot of other things better (unified device tree, smaller
kernel images, etc.)
But my main point remains, is this really a problem? Do systems really
name their network devices with names that stop working with this change
today? Distros use the mac address these days to name network devices
in a unique way, and that namespace does not conflict with the pci
attributes.
thanks,
greg k-h
next prev parent reply other threads:[~2007-02-18 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 15:55 Converting network devices from class devices causes namespace pollution Eric W. Biederman
2007-02-18 19:46 ` Greg KH [this message]
2007-02-18 22:52 ` Eric W. Biederman
2007-02-19 3:01 ` Greg KH
2007-02-19 8:19 ` Eric W. Biederman
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=20070218194641.GA9929@suse.de \
--to=gregkh@suse.de \
--cc=ebiederm@xmission.com \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.