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:   Mon, 30 Jul 2018 21:42:42 +0200
From:   Michal Kubecek <mkubecek@...e.cz>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiri Pirko <jiri@...nulli.us>,
        David Miller <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Roopa Prabhu <roopa@...ulusnetworks.com>,
        Jakub Kicinski <kubakici@...pl>,
        "John W. Linville" <linville@...driver.com>
Subject: Re: [RFC PATCH net-next v2 10/17] ethtool: implement GET_SETTINGS
 message

On Mon, Jul 30, 2018 at 09:09:41PM +0200, Andrew Lunn wrote:
> > +Response contents:
> > +
> > +    ETHA_SETTINGS_LINK		(u32)		link state
> 
> > +	[ETHA_SETTINGS_LINK]		= { .type = NLA_FLAG },
> 
> Is this correct?

NLA_FLAG is wrong, we need three states: on/off/unknown for "get"
replies and on/off/keep for "set" requests.

> The link is either up or down. So a u32 seems a bit big.

I tend to use u32 everywhere with some obvious exceptions. The reason is
that netlink attributes are padded to 32 bits so that no matter if you
use u8, u16 or u32, the attribute still ends up taking 8 bytes. But yes,
this looks like an obvious exception where u8 wouldn't mean any risk of
running out of values one day.

Michal Kubecek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ