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: <201111251507.11404.vapier@gentoo.org>
Date:	Fri, 25 Nov 2011 15:07:09 -0500
From:	Mike Frysinger <vapier@...too.org>
To:	"Lars-Peter Clausen" <lars@...afoo.de>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
	drivers@...log.com, stable@...nel.org
Subject: Re: [PATCH 4/8] firmware: Sigma: Mark firmware strutcs packed

On Friday 25 November 2011 05:48:20 Lars-Peter Clausen wrote:
> On 11/24/2011 06:19 PM, Mike Frysinger wrote:
> > On Thursday 24 November 2011 07:48:23 Lars-Peter Clausen wrote:
> >> Mark structs which are embedded into the firmware as packed to avoid
> >> alignment issues.
> > 
> > while in general this makes sense, i designed the struct layout
> > specifically to work on any sane system.  that means 8bits align on
> > 8bits, 16bits align on 16bits, and 32bits align on 32bits.
> > 
> > do you see any place where this is not the case ?  otherwise, using
> > __packed by itself doesn't make much sense unless you also change all
> > the loads from the struct to the get_unaligned variety which would add
> > useless overhead to many embedded parts.
> > 
> > all in all, i'd omit the __packed markings since they're unnecessary.
> 
> While you are right I think it's generally a good idea to mark anything as
> packed, where we don't have direct influence on the alignment, to avoid
> unpleasant suppresses.

don't we though ?  the ADI peeps writing the driver code work directly with 
the ADI sigmadsp peeps for the firmware needs.  so as long as we make sure the 
layout stays sane, then it stays sane ... otherwise, we need to be vigilant to 
make sure people don't go slipping in useless get_unaligned calls to the code.  
if they see "__packed", they think it's correct.
-mike

Download attachment "signature.asc " of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ