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: <0c7a753b-cdc6-4036-84af-909ca1df3f3a@lunn.ch>
Date: Mon, 12 May 2025 04:41:05 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Damien RiƩgel <damien.riegel@...abs.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Silicon Labs Kernel Team <linux-devel@...abs.com>,
	netdev@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC net-next 04/15] net: cpc: add protocol header structure and
 API

> +struct cpc_header {
> +	u8 ctrl;
> +	u8 ep_id;
> +	u8 recv_wnd;
> +	u8 seq;
> +	u8 ack;
> +	union {
> +		u8 extension[3];
> +		struct __packed {
> +			__le16 mtu;
> +			u8 reserved;
> +		} syn;
> +		struct __packed {
> +			__le16 payload_len;
> +			u8 reserved;

These two le16 are unaligned for no good reason. Put the reserved byte
first, then the u16. Once you have done that, you might be able to
throw away all the __packed because it is then all naturally aligned.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ