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: <20221110085907.764e18cd@kernel.org>
Date:   Thu, 10 Nov 2022 08:59:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vincent MAILHOL <mailhol.vincent@...adoo.fr>
Cc:     Leon Romanovsky <leon@...nel.org>, netdev@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Guangbin Huang <huangguangbin2@...wei.com>,
        Sean Anderson <sean.anderson@...o.com>,
        Tom Rix <trix@...hat.com>,
        Tonghao Zhang <xiangxia.m.yue@...il.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Marco Bonelli <marco@...eim.net>
Subject: Re: [PATCH net-next v1] ethtool: ethtool_get_drvinfo: populate
 drvinfo fields even if callback exits

On Thu, 10 Nov 2022 17:34:55 +0900 Vincent MAILHOL wrote:
> > While I'm typing - I've used dev_driver_string() to get the driver
> > name in the past. Perhaps something to consider?  
> 
> I am not sure of that one. If dev->dev.parent->driver is not set, it
> defaults to dev_bus_name() which is .bus_info, isn't it?
> https://elixir.bootlin.com/linux/latest/source/drivers/base/core.c#L2181

I don't think so?  We put dev_name() into bus_info, which is usually
the address of the device on the bus (e.g. (D)BDF for PCI, like
0000:00:14.3). The name of the bus is pci. dev_driver_string() will
also fall back to printing class name.

>  For the end user, it might be better to display an empty driver name
> in 'ethtool -i' rather than reporting the bus_info twice?
> 
> I mean, if you ask me for my opinion, then my answer is "I am not
> sure". If you have confidence that dev_driver_string() is better, then
> I will send a v2 right away.

Well, it doesn't matter. I asked because handful of popular drivers 
use dev_driver_string(). But.. these are drivers so parent->driver 
will be set and it ends up not making any difference.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ