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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 28 Dec 2020 13:35:46 +0000
From:   "Rudy Lei (shlei)" <shlei@...co.com>
To:     Michal Kubecek <mkubecek@...e.cz>, Bruce LIU <ccieliu@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: "ethtool" missing "master-slave" args in "do_sset"
 function.[TEXT/PLAIN]


Hi Michal,
 
Merry Christmas and thanks a lot for the prompt reply.
After upgraded the kernel to 5.10 and we did see the expected logs:

[root@...ei-dev-machine ~]# ethtool -s ens32 master-slave preferred-master
netlink error: master/slave configuration not supported by device (offset 36)
netlink error: Operation not supported

 
Best Regards,
Rudy

´╗┐On 2020/12/27, 5:46 PM, "Michal Kubecek" <mkubecek@...e.cz> wrote:

    On Sun, Dec 27, 2020 at 12:34:09PM +0800, Bruce LIU wrote:
    > Hi Michal Kubecek and Network dev team,
    > 
    > Good day! Hope you are doing well.
    > This is Bruce from China, and please allow me to cc Rudy from Cisco Systems
    > in China team.
    > 
    > We are facing a weird behavior about "master-slave configuration" function
    > in ethtool.
    > Please correct me if I am wrong....
    > 
    > As you know, start from ethtool 5.8,  "master/slave configuration support"
    > added.
    > https://lwn.net/Articles/828044/
    > 
    > ========================================================================
    > Appeal:
    > Confirm and discuss workaround
    > 
    > ========================================================================
    > Issue description:
    > As we test in lab, no "master-slave" option supported.
    > 
    > ========================================================================
    > Issue reproduce:
    > root@...pberrypi:~# ethtool -s eth0 master-slave master-preferred
    > ethtool: bad command line argument(s)
    > For more information run ethtool -h
    > 
    > ========================================================================
    > Environment:
    > debian-live-10.7.0-amd64-standard.iso
    > Kernel 5.4.79

    This is the problem. Kernel support for this feature was added in
    5.8-rc1 so that your kernel does not have it and there is no chance it
    could possibly work. Newer ethtool has support for this feature but
    kernel must support it as well for it to actually work.

    But I agree that the error message is misleading. We handle subcommands
    supported only in netlink with proper error message when ioctl fallback
    is used but we don't do the same for new parameters of existing
    subcommands which are generally supported by ioctl code. That's why the
    command line parser used by ioctl code does not recognize the new
    parameter and handles it as a syntax error.

    We'll need to handle new parameters in ioctl parser so that it produces
    more meaningful error for parameters only supported via netlink. Long
    term, the proper solution would probably be using one parser for both
    netlink and ioctl but that was something I wanted to avoid for now to
    reduce the risk of introducing subtle changes in behaviour of existing
    code.

    Michal

Powered by blists - more mailing lists