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]
Date:   Mon, 14 Jun 2021 14:23:53 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Jonathan Davies <jonathan.davies@...anix.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Oliver Neukum <oneukum@...e.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: usbnet: allow overriding of default USB interface
 naming

> > > Userspace solutions include:
> > >   1. udev backing off and retrying in the event of a collision; or
> > >   2. avoiding ever renaming a device to a name in the "eth%d" namespace.
> > 
> > Picking a different namespace does not cause a lack of collisions to
> > happen, you could have multiple usb network devices being found at the
> > same time, right?
> > 
> > So no matter what, 1) has to happen.
> 
> Within a namespace, the "%d" in "eth%d" means __dev_alloc_name finds a name
> that's not taken. I didn't check the locking but assume that can only happen
> serially, in which case two devices probed in parallel would not mutually
> collide.
> 
> So I don't think it's necessarily true that 1) has to happen.

Say you changed the namespace to usb%d. And you want the device in USB
port 1.4 to be usb1 and the device in USB port 1.3 to be usb0. They
probe the other way around. You have the same problem, you need to
handle the race condition in udev, back off an try again.

As GregKH said, 1) has to happen.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ