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:	Tue, 8 Dec 2015 00:33:04 +0100
From:	Felix Fietkau <nbd@...nwrt.org>
To:	Gilad Avidov <gavidov@...eaurora.org>, gregkh@...uxfoundation.org,
	netdev@...r.kernel.org
Cc:	sdharia@...eaurora.org, linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org, vikrams@...eaurora.org,
	shankerd@...eaurora.org
Subject: Re: [PATCH] net: emac: emac gigabit ethernet controller driver

On 2015-12-07 23:58, Gilad Avidov wrote:
> +/* RRD (Receive Return Descriptor) */
> +union emac_rrd {
> +	struct {
> +		/* 32bit word 0 */
> +		u32  xsum:16;
> +		u32  nor:4;       /* number of RFD */
> +		u32  si:12;       /* start index of rfd-ring */
> +		/* 32bit word 1 */
> +		u32  hash;
> +		/* 32bit word 2 */
You should never use bitfields for hardware structs.
I think in general, kernel code should be made endian safe, even if you
only care about one particular endian type for your platform.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ