linux-uconsole/drivers/crypto/caam
Steve Cornelius b6d2d39a05 crypto: caam - fix RNG buffer cache alignment
commit 412c98c1be upstream.

The hwrng output buffers (2) are cast inside of a a struct (caam_rng_ctx)
allocated in one DMA-tagged region. While the kernel's heap allocator
should place the overall struct on a cacheline aligned boundary, the 2
buffers contained within may not necessarily align. Consenquently, the ends
of unaligned buffers may not fully flush, and if so, stale data will be left
behind, resulting in small repeating patterns.

This fix aligns the buffers inside the struct.

Note that not all of the data inside caam_rng_ctx necessarily needs to be
DMA-tagged, only the buffers themselves require this. However, a fix would
incur the expense of error-handling bloat in the case of allocation failure.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-29 12:08:34 -07:00
..
caamalg.c crypto: caam - fix inconsistent assoc dma mapping direction 2013-05-14 10:37:57 +08:00
caamhash.c crypto: caam - Fixed the memory out of bound overwrite issue 2013-08-04 16:50:57 +08:00
caamrng.c crypto: caam - fix RNG buffer cache alignment 2015-06-29 12:08:34 -07:00
compat.h Revert "crypto: caam - add IPsec ESN support" 2013-03-21 17:36:03 +08:00
ctrl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-05-02 14:53:12 -07:00
ctrl.h crypto: caam - ERA retrieval and printing for SEC device 2012-07-11 11:06:11 +08:00
desc.h crypto: caam - add support for SEC v5.x RNG4 2012-06-27 14:42:06 +08:00
desc_constr.h crypto: caam - support external seq in/out lengths 2012-06-27 14:42:04 +08:00
error.c crypto: caam - add allocation failure handling in SPRINTFCAT macro 2014-06-07 13:25:39 -07:00
error.h crypto: caam - fix printk recursion for long error texts 2011-05-04 15:15:06 +10:00
intern.h crypto: caam - fix job ring cleanup code 2013-04-25 21:09:07 +08:00
jr.c crypto: caam - fix job ring cleanup code 2013-04-25 21:09:07 +08:00
jr.h
Kconfig crypto: caam - fix typo "CRYPTO_AHASH" 2013-03-10 18:16:36 +08:00
key_gen.c crypto: caam - change key gen functions to return signed int 2013-04-25 21:01:43 +08:00
key_gen.h crypto: caam - change key gen functions to return signed int 2013-04-25 21:01:43 +08:00
Makefile crypto: caam - hwrng support 2012-06-27 14:42:06 +08:00
pdb.h crypto: caam - add PDB (Protocol Descriptor Block) definitions 2012-06-27 14:42:04 +08:00
regs.h crypto: caam - set RDB bit in security configuration register 2013-03-22 18:13:54 +08:00
sg_sw_sec4.h crypto: caam - chaining support 2012-06-27 14:42:05 +08:00