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] [day] [month] [year] [list]
Message-ID: <CAG-2HqVQRTdA5NvjirR35qLbAkDUB1dN6oAvU2CLs4dnFS42Nw@mail.gmail.com>
Date:	Sat, 1 Mar 2014 15:19:03 +0100
From:	Tom Gundersen <teg@...m.no>
To:	David Herrmann <dh.herrmann@...il.com>
Cc:	netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Kay Sievers <kay.sievers@...y.org>,
	Johannes berg <johannes@...solutions.net>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux Wireless List <linux-wireless@...r.kernel.org>
Subject: Re: [PATCH 0/4] Provide netdev naming-policy via sysfs

On Thu, Feb 27, 2014 at 4:47 PM, Tom Gundersen <teg@...m.no> wrote:
> On Thu, Feb 27, 2014 at 3:47 PM, David Herrmann <dh.herrmann@...il.com> wrote:
>> This series implements a new sysfs attribute for netdevs called
>> "name_assign_type". It provides an integer that describes where an interface
>> name comes from. See Patch #1 for a description of this attribute. It is
>> modelled after the existing "addr_assign_type" attribute.
>>
>> The main use-case is to allow udev to skip applying reliable ifnames to virtual
>> devices. For instance, if wifi-P2P devices are created, wpas already provides a
>> suitable naming-policy and udev shouldn't touch these devices. Same is true for
>> other virtual devices.
>> The idea is that if a device-name was provided by user-space, we should always
>> prefer fixing this naming-policy instead of making udev rename the device. For
>> kernel provided names that's hardly possible, though. Providing the
>> naming-policy source via sysfs is thus a simple way to see whether renames are
>> needed.
>>
>> Additionally, this field allows to detect whether a netdev has been manually
>> renamed, which is quite useful for debugging and during crash-recovery.
>
> Moreover, it would be useful for udev to reliably know if some other
> userspace process already renamed a device, so we know not to touch
> it. This can easily happen for instance if some renaming happens in
> the initrd or from script called from udev rules.

Incidentally, just after writing this email I ran into precisely this
problem due to buggy udev rules in a third-party package. The result
was that the upstream NIC naming rules were unable to detect that a
given NIC had already been renamed and ended up renaming them a second
time (hence wrecking havoc).

The problem was easy enough to fix, but with these patches we would be
able to avoid the issue altogether, so I'm looking forward to fixing
up udev to using this interface.

> Acked-by: Tom Gundersen <teg@...m.no>
--
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