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: Tue, 18 Jun 2024 09:56:40 +0000
From: Justin Lai <justinlai0215@...ltek.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Jakub Kicinski <kuba@...nel.org>,
        "davem@...emloft.net"
	<davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "horms@...nel.org" <horms@...nel.org>,
        "rkannoth@...vell.com"
	<rkannoth@...vell.com>,
        Ping-Ke Shih <pkshih@...ltek.com>,
        Larry Chiu
	<larry.chiu@...ltek.com>
Subject: RE: [PATCH net-next v20 10/13] rtase: Implement ethtool function

> 
> > > > +     strscpy(drvinfo->bus_info, pci_name(tp->pdev), 32);
> > >
> > > Can you double check that overwriting these fields is actually needed?
> > > I think core will fill this in for you in ethtool_get_drvinfo()
> >
> > I have removed this line of code for testing. Before removing the
> > code, I could obtain bus info by entering "ethtool -i". However, after
> > removing the code, entering "ethtool -i" no longer retrieves the bus info.
> 
> https://elixir.bootlin.com/linux/latest/source/net/ethtool/ioctl.c#L710
> 
>         if (ops->get_drvinfo) {
>                 ops->get_drvinfo(dev, &rsp->info);
>                 if (!rsp->info.bus_info[0] && parent)
>                         strscpy(rsp->info.bus_info, dev_name(parent),
>                                 sizeof(rsp->info.bus_info));
> 
> This suggests you have not set the parent device.
> 
>         Andrew
Hi Andrew,
I understand your explanation. However, when we input ethtool -i,
shouldn't we aim to get the bus info of the actual device rather than
the parent device? That's why I think we need to add this line.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ