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: <285fa0c5-4c1f-9add-436d-0833da57ee64@aquantia.com>
Date:   Mon, 22 Apr 2019 13:51:29 +0000
From:   Igor Russkikh <Igor.Russkikh@...antia.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "David S . Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Nikita Danilov <Nikita.Danilov@...antia.com>,
        Dmitry Bogdanov <Dmitry.Bogdanov@...antia.com>
Subject: Re: [PATCH netnext 02/16] net: aquantia: implement hwmon api for chip
 temperature


>> Thanks for the suggestion, I'll investigate.
>> On my current system I however see it is named correctly after interface rename,
>> like 'enp1s0-pci-0100'.
> 
> Interesting.
> 
> So you register the hwmon device after registering the netdev. So it
> could be on your system that systemd has already renamed the interface
> by the time you register the hwmon device. But i don't think there is
> any guarantee about this.
> 
> You could also try
> 
> ip link set enp1s0-pci-0100 name eth42
> 
> to illustrate the point.

Did some investigation, and the interesting point is that hwmon device stores
a pointer to the passed name string.

This means passing the `ndev->name` makes hwmon always refer actual netdev name.
And consequently interface renaming gets correctly propagated to hwmon device.

I did a quick check for possible side effects but see it works as expected this
way. Some other devices also use this strategy with hwmon.

Regards,
  Igor

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ