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  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]
Date:	Sat, 24 May 2008 10:15:16 +0100
From:	James Chapman <jchapman@...alix.com>
To:	Matt Domsch <Matt_Domsch@...l.com>
CC:	Jan Engelhardt <jengelh@...ozas.de>,
	Jon Masters <jonathan@...masters.org>,
	Thomas Graf <tgraf@...g.ch>, Rick Jones <rick.jones2@...com>,
	"Kok, Auke" <auke-jan.h.kok@...el.com>, johnathan@...masters.org,
	netdev@...r.kernel.org, dwmw2@...radead.org
Subject: Re: network interface *name* alias support?

Matt Domsch wrote:
> On Sat, May 24, 2008 at 06:53:17AM +0200, Jan Engelhardt wrote:
>> On Saturday 2008-05-24 06:25, Jon Masters wrote:
>>> I guess that would also work quite nicely for what I want to do, but the
>>> problem is that this will require either:
>>>
>>> *). The kernel decodes the DMI extension directly.
> 
> which is pretty easy to do.
> 
>> *). We can first inform each device which slot it is in (set the slot).
>>> My intention is to implement whatever seems reasonable, and my reason
>>> for asking is that I am not a networking maintainer, so I want to know
>>> what seems reasonable :)
>> Why are we even looking at slot numbers? I do not think there is any
>> guarantee that the order of slots as a human would recognize them on
>> the board must always correspond to a monotonically increasing linear
>> function.
> 
> The guarantee comes from the SMBIOS tables describing the slot
> physically, including the label on the motherboard for it, as well as
> the new SMBIOS table bits in the 2.6 spec that provide the linkage
> between a PCI domain/bus/device/function to slot (or embedded)
> mapping.  New type 41, and extended type 9, can provide this linkage.
> Dell late-model servers implement this in their BIOS.
> 
> Just to throw a wrench in, look at how udev handles disks presently.
> The same physical device is represented in at least 6 different ways:
> /dev/disk/by-{id,label,path,uuid,edd} and /dev/sdX.  There was much
> confusion at first when the /dev/hda IDE driver device names changed
> to /dev/sda with the advent of libata.  People used these alternate
> naming schemes to circumvent the problem.  The by-label and by-uuid
> names didn't change.  Only the tools that hard-coded /dev/hda needed
> to change.
> 
> Conceptually I'm looking for the same thing.  The kernel uses the
> names ethN for most ethernet type devices.  However, there might be
> logical names we would want to assign (public, private, dmz, ...), or
> some form of BIOS-assigned (Gb1, Gb2 to match the label printed on the
> chassis), or some form of physical placement names (eth_embedded1,
> eth_embedded2, eth_slot1_1 and eth_slot1_2 for a multiport card),
> etc.  Right now network devices have essentially one name; yes, you
> can change it, at the peril of breaking all the tools that assume your
> network cards are ethN, just as there was breakage for tools that
> assumed disks were /dev/hda.  But you can't have the multiple names.
> 
> In Fedora 10 rawhide, I'm prepared to change the names of the network
> devices from ethN to eth_s0_1 (first embedded NIC) very early in the
> process and try to find what all breaks.  But it would be really nice
> to be able to assign these other types of names to a device as well,
> ideally without breaking tools that are counting on the ethN names.
> 
> Any options for doing so would be appreciated.

I can see why netdev name aliases might be useful but there are 
potential usability issues. One example is a user who tries to name a 
device eth_s0_1 and gets an error that the device already exists 
(because an alias already exists with that name), yet ifconfig etc 
doesn't list a device with that name. Confusion ensues. Also, kernel 
logs will use the real name in messages, which makes it harder for the 
user to locate messages of her device if she only knows it by its 
aliased name.

Wouldn't it be better to fix any applications that can't handle renamed 
devices?

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development

--
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