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]
Date:   Mon, 5 Oct 2020 09:46:00 +0200
From:   Michal Kubecek <mkubecek@...e.cz>
To:     Ido Schimmel <idosch@...sch.org>
Cc:     David Laight <David.Laight@...lab.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "saeedm@...dia.com" <saeedm@...dia.com>,
        "ayal@...dia.com" <ayal@...dia.com>,
        "mlxsw@...dia.com" <mlxsw@...dia.com>,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [RFC PATCH net-next v2] ethtool: Improve compatibility between
 netlink and ioctl interfaces

On Sun, Oct 04, 2020 at 04:37:57PM +0300, Ido Schimmel wrote:
> On Sun, Oct 04, 2020 at 12:46:31PM +0000, David Laight wrote:
> > From: Ido Schimmel
> > > Sent: 04 October 2020 11:17
> > > 
> > > With the ioctl interface, when autoneg is enabled, but without
> > > specifying speed, duplex or link modes, the advertised link modes are
> > > set to the supported link modes by the ethtool user space utility.
> > ...
> > > Fix this incompatibility problem by introducing a new flag in the
> > > ethtool netlink request header: 'ETHTOOL_FLAG_LEGACY'. The purpose of
> > > the flag is to indicate to the kernel that it needs to be compatible
> > > with the legacy ioctl interface. A patch to the ethtool user space
> > > utility will make sure the flag is always set.
> > 
> > You need to do that the other way around.
> > You can't assume the kernel and application are updated
> > at the same time.
> 
> Thanks, David. In case ethtool is updated without updating the kernel we
> will indeed get an error:
> 
> # ethtool -s eth0 autoneg on
> netlink error: unrecognized request flags (offset 36)
> netlink error: Operation not supported
> 
> Will wait for Michal's comments before doing another round.

Inverting the logic of the flag wouldn't help much as any tool using the
inverted flag would have the same problem with older kernels. Also,
ethtool needs to handle such errors for any newly added global flag as
discussed in

  http://lkml.kernel.org/r/20200923224510.h3kpgczd6wkpoitp@lion.mk-sys.cz

I'll be too busy today but I'll try to propose a patch implementing the
retry logic in ethtool tomorrow morning.

Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ