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: <20130129015411.GD4748@opensource.wolfsonmicro.com>
Date:	Tue, 29 Jan 2013 09:54:15 +0800
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regmap: spi: Support asynchronous I/O for SPI

On Mon, Jan 28, 2013 at 05:47:36PM -0800, Stephen Boyd wrote:
> On 01/28/13 17:39, Mark Brown wrote:

> > We could but I tend not to if the interface strictly requires that the
> > pointers be type punnable.

> What is the interface requiring strict type punning here? async_write?

Yes, the async data must always be the first member of the bus specific
struct.  This is to avoid having to do an additional allocation for the
bus specific private data.

> I just hope we don't move the fields around in the regmap_async_spi
> struct and then this code silently breaks. I hope the compiler is smart
> enough to skip doing any math if we used container_of() with the current
> struct layout.

It would break anyway, like I say the interface relies on it currently.
The other option is to do a callback into the bus code and return the
contained structure but it seemed more involved and this is fairly
idiomatic.

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