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: <20160211.113946.1731145198917250643.davem@davemloft.net>
Date:	Thu, 11 Feb 2016 11:39:46 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	brussell@...cade.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] nsh: encapsulation module

From: Brian Russell <brussell@...cade.com>
Date: Thu, 11 Feb 2016 10:35:13 +0000

> +++ b/include/net/nsh.h
> +struct nsh_metadata {
> +	u_short class;
> +	u_char crit;
> +	u_char type;
> +	u_int len;  /* 4 byte words */
> +	void *data;

Do not use these shorthands, spell out "unsigned short" etc. explicitly.

But in these cases you should be using fixed sized types like "u16".

Also, in a header file such as this one which is private to the kernel
you should be using the variants of these types without the leading underscores.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ