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]
Message-ID: <20221114181712.51856dd4@kernel.org>
Date:   Mon, 14 Nov 2022 18:17:12 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: dsa: use NET_NAME_PREDICTABLE for user ports with
 name given in DT

On Sun, 13 Nov 2022 21:03:52 +0100 Rasmus Villemoes wrote:
> > I know it is a change in behaviour, but it seems like NET_NAME_ENUM
> > should be used, not NET_NAME_UNKNOWN. alloc_etherdev_mqs() uses
> > NET_NAME_ENUM.  
> 
> I don't really have any strong opinion on the case where we fall back to
> eth%d, as its not relevant to any board I've worked on.
> 
> > https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/netdevice.h#L42
> > says that NET_NAME_UNKNOWN does not get passed to user space, but i
> > assume NET_NAME_ENUM does. So maybe changing it would be an ABI
> > change?  
> 
> Well, the name_assign_type ABI is kind of silly. I mean, userspace knows
> that when one gets EINVAL trying to read the value, that really means
> that the value is NET_NAME_UNKNOWN. But I won't propose changing that.
> 
> However, what I do propose here is obviously already an ABI change; I
> _want_ to expose more proper information in the case where the port has
> a label, and just kept the NET_NAME_UNKNOWN for the eth%d case to make
> the minimal change. But if people want to change that to NET_NAME_ENUM
> while we're here, I can certainly do that. I can't think of any real
> scenario where NET_NAME_ENUM would be treated differently than
> NET_NAME_UNKNOWN - in both cases, userspace don't know that the name can
> be trusted to be predictable.

Apparently there may be a reason, see commit e9f656b7a214 ("net:
ethernet: set default assignment identifier to NET_NAME_ENUM")
so let's switch to ENUM while at it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ