summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSteve Cornelius <steve.cornelius@freescale.com>2015-06-15 16:52:59 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-29 12:25:37 -0700
commitf78a4015ad03e92f09f990972bfc01b3eed5da90 (patch)
treea57eecc591e95f3321f66ee1b18d8a4502b2ed7a /kernel
parent165797d05c15ab87ef7421c63a076ffa8477cbe4 (diff)
downloadlwn-f78a4015ad03e92f09f990972bfc01b3eed5da90.tar.gz
lwn-f78a4015ad03e92f09f990972bfc01b3eed5da90.zip
crypto: caam - fix RNG buffer cache alignment
commit 412c98c1bef65fe7589f1300e93735d96130307c 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>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions