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: <20230918082309.7e592c7c@hermes.local>
Date: Mon, 18 Sep 2023 08:23:09 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, andrew@...n.ch,
 mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next 1/3] net: libwx: support hardware statistics

On Mon, 18 Sep 2023 15:21:06 +0800
Jiawen Wu <jiawenwu@...stnetic.com> wrote:

> +
> +struct wx_stats {
> +	char stat_string[ETH_GSTRING_LEN];
> +	int type;
> +	int sizeof_stat;
> +	int stat_offset;
> +};

Type here is an enum. Therefore for type safety you should use that
enum for the type field rather than int.

Since offset and size can never be negative, why not use offset_t and size_t instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ