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: <20200127064258.GI3870@unreal>
Date:   Mon, 27 Jan 2020 08:42:58 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     netdev@...r.kernel.org, Shannon Nelson <snelson@...sando.io>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Michal Kalderon <michal.kalderon@...vell.com>,
        RDMA mailing list <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH net-next] net/core: Replace driver version to be kernel
 version

On Mon, Jan 27, 2020 at 07:08:35AM +0100, Michal Kubecek wrote:
> On Sun, Jan 26, 2020 at 02:57:21PM -0800, Shannon Nelson wrote:
> > On 1/26/20 2:22 PM, Michal Kubecek wrote:
> > > On Sun, Jan 26, 2020 at 02:12:38PM -0800, Shannon Nelson wrote:
> > > > Part of the pain of supporting our users is getting them to give us useful
> > > > information about their problem.  The more commands I need them to run to
> > > > get information about the environment, the less likely I will get anything
> > > > useful.  We've been training our users over the years to use "ethtool -i" to
> > > > get a good chunk of that info, with the knowledge that the driver version is
> > > > only a hint, based upon the distro involved.  I don't want to lose that
> > > > hint.  If anything, I'd prefer that we added a field for UTS_RELEASE in the
> > > > ethtool output, but I know that's too much to ask.
> > >
> > > At the same time, I've been trying to explain both our L1/L2 support
> > > guys and our customers that "driver version" information reported by
> > > "ethtool -i" is almost useless and that if they really want to identify
> > > driver version, they should rather use srcversion as reported by modinfo
> > > or sysfs.
> >
> > So as I suggested elsewhere, can we compromise by not bashing the driver
> > string in the caller stack, but require the in-kernel drivers to use a
> > particular macro that will put the kernel/git version into the string?  This
> > allows out-of-tree drivers the option of overriding the version with some
> > other string that can be meaningful in any other given old or new distro
> > kernel.  This should be easy to enforce mechanically with checkpatch, and
> > easy enough to do a sweeping coccinelle change on the existing drivers.
>
> Personally, I rather liked what Jakub suggested earlier: set
> ethtool_drvinfo::version to kernel version before ops->get_drvinfo() is called
> in ethtool_get_drvinfo() (and its netlink counterpart once we get some
> consensus about what information should be in the message), clean up in-tree
> drivers so that they don't touch it and add a coccinelle check so that we keep
> in-tree drivers compliant; this would allow out-of-tree drivers to overwrite
> ethtool_drvinfo::version with whatever they want.

It works for MODULE_VERSION(), so I don't see any reason to have different
solution for the same value for ethtool.

For example, ib_core module doesn't have MODULE_VERSION() string.
[leonro@...ver ~]$ modinfo ib_core
filename:       /lib/modules/5.5.0-rc6/modules/ib_core.ko
<...>
intree:         Y
name:           ib_core
vermagic:       5.5.0-rc6 SMP mod_unload modversions
<...>

Thanks

>
> Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ