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:   Wed, 6 Apr 2022 11:56:51 +1000
From:   Ian Wienand <iwienand@...hat.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>, Tom Gundersen <teg@...m.no>,
        David Herrmann <dh.herrmann@...il.com>
Subject: Re: [PATCH v2] net/ethernet : set default assignment identifier to
 NET_NAME_ENUM

Thanks for review

On Tue, Apr 05, 2022 at 12:41:03PM -0700, Jakub Kicinski wrote:
> Can you spell out how netfront gets a different type to virtio?
> I see alloc_etherdev_mq() in both cases.

Yeah I've been doing further testing to narrow this down, and I think
I've been confused by the renaming happening during the initrd steps.

It seems that renamed devices (no matter what the driver) will have
their name_assign_type set to NET_NAME_USER; which [1] gives away as
coming from the rtnl_newlink path.  virtio devices were renamed in
init phase in my testing environment, which is why
/sys/class/net/<iface>/net_name_type works for them by the time
interactive login starts -- not because they explicitly flag
themselves.  Sorry for not recognising that earlier.

> This worries me. Why is UNKNOWN and ENUM treated differently?
> Can you point me to the code which pays attention to the assign type?

Yeah, I'll have to retract that claim; it remains unclear to me why
CentOS 8-stream does not rename netfront devices (systemd 239) and
CentOS 9-stream does (systemd 249).

systemd only seems to use NET_NAME_ENUM in an informational way to
print a warning when you're using a .link file to set network info for
a device that might change names [2].

Perhaps this still has some utility in making that warning more
useful?

[1] https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/ip/iplink.c#n65
[2] https://github.com/systemd/systemd/blob/main/src/udev/net/link-config.c#L446

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ