Re: Alignment in the API, once again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 02, 2007 at 09:41:22AM +0200, Sebastian Siewior wrote:
> 
> Okey this makes sense. What about crypto_ctxsize()? Isn't a bug there?
> I can't specify an alignmask of 16 (what I assumed yesterday after a
> part of brain switched to sleep()) because this brakes the ALIGN()
> macro. Isn't something like

15 & ~7 == 8

is sufficient to guarantee 16-byte alignment.  Remember that
the ctx member is already 8-byte aligned.  So we only need
to add a maximum of 8 extra bytes to get it 16-byte aligned.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux