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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150127.111334.501141232585900738.davem@davemloft.net>
Date:	Tue, 27 Jan 2015 11:13:34 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	David.Laight@...LAB.COM
Cc:	amirv@...lanox.com, netdev@...r.kernel.org, ogerlitz@...lanox.com,
	yevgenyp@...lanox.com, jackm@....mellanox.co.il
Subject: Re: [PATCH net-next 06/10] net/mlx4_core: Fix struct mlx4_vhcr_cmd
 to make implicit padding explicit

From: David Laight <David.Laight@...LAB.COM>
Date: Tue, 27 Jan 2015 09:43:27 +0000

>>  	__be64 out_param;
>>  	__be16 token;
>>  	u16 reserved;
>>  	u8 status;
>>  	u8 flags;
>>  	__be16 opcode;
>> -};
>> +} __packed;
> 
> Don't add '__packed' unless you expect the structure to be misaligned
> in memory.
> On systems that fault mis-aligned memory requests you've requested the
> compiler generate code to read/write everything using byte sized memory
> accesses and a lot of shifting and masking.

Indeed, I'm really sick of seeing these packed structures being
created all over the place.

They are to be used in absolutely extreme cases where no other
solution is possible.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ