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: <YHsutM6vesbQq+Ju@shredder.lan>
Date:   Sat, 17 Apr 2021 21:53:40 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, andrew@...n.ch,
        mkubecek@...e.cz, idosch@...dia.com, saeedm@...dia.com,
        michael.chan@...adcom.com
Subject: Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading
 standard stats

On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote:
> On Sat, 17 Apr 2021 10:57:42 -0700 Jakub Kicinski wrote:
> > > I tried to understand how you add new groups without user space
> > > changes and I think this statement is not entirely accurate.
> > > 
> > > At minimum, user space needs to know the names of these groups, but
> > > currently there is no way to query the information, so it's added to
> > > ethtool's help message:
> > > 
> > > ethtool [ FLAGS ] -S|--statistics DEVNAME       Show adapter statistics       
> > >        [ --groups [eth-phy] [eth-mac] [eth-ctrl] [rmon] ]  
> > 
> > Um, yes and now. The only places the user space puts those names 
> > is the help message and man page.
> > 
> > Thru the magic of bitsets it doesn't actually interpret them, so
> > with old user space you can still query a new group, it will just 
> > not show up in "ethtool -h".
> > 
> > Is that what you're saying?
> 
> FWIW ethnl_parse_bit() -> ETHTOOL_A_BITSET_BIT_NAME
> User space can also use raw flags like --groups 0xf but that's perhaps
> too spartan for serious use.

So the kernel can work with ETHTOOL_A_BITSET_BIT_INDEX /
ETHTOOL_A_BITSET_BIT_NAME, but I was wondering if using ethtool binary
we can query the strings that the kernel will accept. I think not?

Anyway, I'm fine with implementing '--all-groups' via
ETHTOOL_MSG_STRSET_GET. We can always add a new attribute later, but I
don't see a reason to do so.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ