<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/crypto, branch v4.1.6</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer</title>
<updated>2015-08-17T03:52:19+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-07-22T10:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=593b1559bb5024f922724b86c161a13006948d63'/>
<id>593b1559bb5024f922724b86c161a13006948d63</id>
<content type='text'>
commit f898c522f0e9ac9f3177d0762b76e2ab2d2cf9c0 upstream.

This patch removes a bogus BUG_ON in the ablkcipher path that
triggers when the destination buffer is different from the source
buffer and is scattered.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f898c522f0e9ac9f3177d0762b76e2ab2d2cf9c0 upstream.

This patch removes a bogus BUG_ON in the ablkcipher path that
triggers when the destination buffer is different from the source
buffer and is scattered.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: qat - Fix invalid synchronization between register/unregister sym algs</title>
<updated>2015-08-17T03:52:19+00:00</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2015-07-22T05:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7047312d383203f7b8447261f1a473cf54aedec3'/>
<id>7047312d383203f7b8447261f1a473cf54aedec3</id>
<content type='text'>
commit 6f043b50da8e03bdcc5703fd37ea45bc6892432f upstream.

The synchronization method used atomic was bogus.
Use a proper synchronization with mutex.

Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6f043b50da8e03bdcc5703fd37ea45bc6892432f upstream.

The synchronization method used atomic was bogus.
Use a proper synchronization with mutex.

Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: nx - Fix reentrancy bugs</title>
<updated>2015-08-17T03:52:16+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-07-07T09:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2d089963836a8e884df3788fad73d5048d0d88b1'/>
<id>2d089963836a8e884df3788fad73d5048d0d88b1</id>
<content type='text'>
commit 030f4e968741d65aea9cd5f7814d1164967801ef upstream.

This patch fixes a host of reentrancy bugs in the nx driver.  The
following algorithms are affected:

* CCM
* GCM
* CTR
* XCBC
* SHA256
* SHA512

The crypto API allows a single transform to be used by multiple
threads simultaneously.  For example, IPsec will use a single tfm
to process packets for a given SA.  As packets may arrive on
multiple CPUs that tfm must be reentrant.

The nx driver does try to deal with this by using a spin lock.
Unfortunately only the basic AES/CBC/ECB algorithms do this in
the correct way.

The symptom of these bugs may range from the generation of incorrect
output to memory corruption.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 030f4e968741d65aea9cd5f7814d1164967801ef upstream.

This patch fixes a host of reentrancy bugs in the nx driver.  The
following algorithms are affected:

* CCM
* GCM
* CTR
* XCBC
* SHA256
* SHA512

The crypto API allows a single transform to be used by multiple
threads simultaneously.  For example, IPsec will use a single tfm
to process packets for a given SA.  As packets may arrive on
multiple CPUs that tfm must be reentrant.

The nx driver does try to deal with this by using a spin lock.
Unfortunately only the basic AES/CBC/ECB algorithms do this in
the correct way.

The symptom of these bugs may range from the generation of incorrect
output to memory corruption.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: nx - Fixing SHA update bug</title>
<updated>2015-08-17T03:52:16+00:00</updated>
<author>
<name>Leonidas Da Silva Barbosa</name>
<email>leosilva@linux.vnet.ibm.com</email>
</author>
<published>2015-04-23T20:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=71a0c1ecf7004a5949cceaa4bb1240923e9d2000'/>
<id>71a0c1ecf7004a5949cceaa4bb1240923e9d2000</id>
<content type='text'>
commit 10d87b730e1d9f1442cae6487bb3aef8632bed23 upstream.

Bug happens when a data size less than SHA block size is passed.
Since first attempt will be saved in buffer, second round attempt
get into two step to calculate op.inlen and op.outlen. The issue
resides in this step. A  wrong value of op.inlen and outlen was being
calculated.

This patch fix this eliminate the nx_sha_build_sg_list, that is
useless in SHA's algorithm context. Instead we call nx_build_sg_list
directly and pass a previous calculated max_sg_len to it.

Signed-off-by: Leonidas S. Barbosa &lt;leosilva@linux.vnet.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 10d87b730e1d9f1442cae6487bb3aef8632bed23 upstream.

Bug happens when a data size less than SHA block size is passed.
Since first attempt will be saved in buffer, second round attempt
get into two step to calculate op.inlen and op.outlen. The issue
resides in this step. A  wrong value of op.inlen and outlen was being
calculated.

This patch fix this eliminate the nx_sha_build_sg_list, that is
useless in SHA's algorithm context. Instead we call nx_build_sg_list
directly and pass a previous calculated max_sg_len to it.

Signed-off-by: Leonidas S. Barbosa &lt;leosilva@linux.vnet.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: nx - Fixing NX data alignment with nx_sg list</title>
<updated>2015-08-17T03:52:16+00:00</updated>
<author>
<name>Leonidas Da Silva Barbosa</name>
<email>leosilva@linux.vnet.ibm.com</email>
</author>
<published>2015-04-23T20:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b2b6e1667f52af6477f4a360cefe8c463dfb60fa'/>
<id>b2b6e1667f52af6477f4a360cefe8c463dfb60fa</id>
<content type='text'>
commit c3365ce130e50176533debe1cabebcdb8e61156c upstream.

In NX we need to pass always a 16 multiple size nx_sg_list to
co processor. Trim function handle with this assuring all nx_sg_lists
are 16 multiple size, although data was not being considerated when
crop was done. It was causing an unalignment between size of the list
and data, corrupting csbcpb fields returning a -23 H_ST_PARM error, or
invalid operation.

This patch fix this recalculating how much data should be put back
in to_process variable what assures the size of sg_list will be
correct with size of the data.

Signed-off-by: Leonidas S. Barbosa &lt;leosilva@linux.vnet.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c3365ce130e50176533debe1cabebcdb8e61156c upstream.

In NX we need to pass always a 16 multiple size nx_sg_list to
co processor. Trim function handle with this assuring all nx_sg_lists
are 16 multiple size, although data was not being considerated when
crop was done. It was causing an unalignment between size of the list
and data, corrupting csbcpb fields returning a -23 H_ST_PARM error, or
invalid operation.

This patch fix this recalculating how much data should be put back
in to_process variable what assures the size of sg_list will be
correct with size of the data.

Signed-off-by: Leonidas S. Barbosa &lt;leosilva@linux.vnet.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: omap-des - Fix unmapping of dma channels</title>
<updated>2015-08-10T19:21:52+00:00</updated>
<author>
<name>Vutla, Lokesh</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2015-07-02T13:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f662ffe3a409bef287c5f0b235d9095b5aa72436'/>
<id>f662ffe3a409bef287c5f0b235d9095b5aa72436</id>
<content type='text'>
commit acb33cc541d7a5495b16a133702d4c401ea4e294 upstream.

dma_unmap_sg() is being called twice after completing the
task. Looks like this is a copy paste error when creating
des driver.
With this the following warn appears during boot:

[    4.210457] ------------[ cut here ]------------
[    4.215114] WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1080 check_unmap+0x710/0x9a0()
[    4.222899] omap-des 480a5000.des: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000ab2ce000] [size=8 bytes]
[    4.236785] Modules linked in:
[    4.239860] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.39-02999-g1bc045a-dirty #182
[    4.247918] [&lt;c001678c&gt;] (unwind_backtrace) from [&lt;c0012574&gt;] (show_stack+0x10/0x14)
[    4.255710] [&lt;c0012574&gt;] (show_stack) from [&lt;c05a37e8&gt;] (dump_stack+0x84/0xb8)
[    4.262977] [&lt;c05a37e8&gt;] (dump_stack) from [&lt;c0046464&gt;] (warn_slowpath_common+0x68/0x8c)
[    4.271107] [&lt;c0046464&gt;] (warn_slowpath_common) from [&lt;c004651c&gt;] (warn_slowpath_fmt+0x30/0x40)
[    4.279854] [&lt;c004651c&gt;] (warn_slowpath_fmt) from [&lt;c02d50a4&gt;] (check_unmap+0x710/0x9a0)
[    4.287991] [&lt;c02d50a4&gt;] (check_unmap) from [&lt;c02d5478&gt;] (debug_dma_unmap_sg+0x90/0x19c)
[    4.296128] [&lt;c02d5478&gt;] (debug_dma_unmap_sg) from [&lt;c04a77d8&gt;] (omap_des_done_task+0x1cc/0x3e4)
[    4.304963] [&lt;c04a77d8&gt;] (omap_des_done_task) from [&lt;c004a090&gt;] (tasklet_action+0x84/0x124)
[    4.313370] [&lt;c004a090&gt;] (tasklet_action) from [&lt;c004a4ac&gt;] (__do_softirq+0xf0/0x20c)
[    4.321235] [&lt;c004a4ac&gt;] (__do_softirq) from [&lt;c004a840&gt;] (irq_exit+0x98/0xec)
[    4.328500] [&lt;c004a840&gt;] (irq_exit) from [&lt;c000f9ac&gt;] (handle_IRQ+0x50/0xb0)
[    4.335589] [&lt;c000f9ac&gt;] (handle_IRQ) from [&lt;c0008688&gt;] (gic_handle_irq+0x28/0x5c)

Removing the duplicate call to dma_unmap_sg().

Reported-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit acb33cc541d7a5495b16a133702d4c401ea4e294 upstream.

dma_unmap_sg() is being called twice after completing the
task. Looks like this is a copy paste error when creating
des driver.
With this the following warn appears during boot:

[    4.210457] ------------[ cut here ]------------
[    4.215114] WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1080 check_unmap+0x710/0x9a0()
[    4.222899] omap-des 480a5000.des: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000ab2ce000] [size=8 bytes]
[    4.236785] Modules linked in:
[    4.239860] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.39-02999-g1bc045a-dirty #182
[    4.247918] [&lt;c001678c&gt;] (unwind_backtrace) from [&lt;c0012574&gt;] (show_stack+0x10/0x14)
[    4.255710] [&lt;c0012574&gt;] (show_stack) from [&lt;c05a37e8&gt;] (dump_stack+0x84/0xb8)
[    4.262977] [&lt;c05a37e8&gt;] (dump_stack) from [&lt;c0046464&gt;] (warn_slowpath_common+0x68/0x8c)
[    4.271107] [&lt;c0046464&gt;] (warn_slowpath_common) from [&lt;c004651c&gt;] (warn_slowpath_fmt+0x30/0x40)
[    4.279854] [&lt;c004651c&gt;] (warn_slowpath_fmt) from [&lt;c02d50a4&gt;] (check_unmap+0x710/0x9a0)
[    4.287991] [&lt;c02d50a4&gt;] (check_unmap) from [&lt;c02d5478&gt;] (debug_dma_unmap_sg+0x90/0x19c)
[    4.296128] [&lt;c02d5478&gt;] (debug_dma_unmap_sg) from [&lt;c04a77d8&gt;] (omap_des_done_task+0x1cc/0x3e4)
[    4.304963] [&lt;c04a77d8&gt;] (omap_des_done_task) from [&lt;c004a090&gt;] (tasklet_action+0x84/0x124)
[    4.313370] [&lt;c004a090&gt;] (tasklet_action) from [&lt;c004a4ac&gt;] (__do_softirq+0xf0/0x20c)
[    4.321235] [&lt;c004a4ac&gt;] (__do_softirq) from [&lt;c004a840&gt;] (irq_exit+0x98/0xec)
[    4.328500] [&lt;c004a840&gt;] (irq_exit) from [&lt;c000f9ac&gt;] (handle_IRQ+0x50/0xb0)
[    4.335589] [&lt;c000f9ac&gt;] (handle_IRQ) from [&lt;c0008688&gt;] (gic_handle_irq+0x28/0x5c)

Removing the duplicate call to dma_unmap_sg().

Reported-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "crypto: talitos - convert to use be16_add_cpu()"</title>
<updated>2015-07-10T16:49:33+00:00</updated>
<author>
<name>Horia Geant?</name>
<email>horia.geanta@freescale.com</email>
</author>
<published>2015-05-11T17:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=44cb6ff1db11f2a147cccc943927a5ca20d1bb81'/>
<id>44cb6ff1db11f2a147cccc943927a5ca20d1bb81</id>
<content type='text'>
commit 69d9cd8c592f1abce820dbce7181bbbf6812cfbd upstream.

This reverts commit 7291a932c6e27d9768e374e9d648086636daf61c.

The conversion to be16_add_cpu() is incorrect in case cryptlen is
negative due to premature (i.e. before addition / subtraction)
implicit conversion of cryptlen (int -&gt; u16) leading to sign loss.

Cc: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 69d9cd8c592f1abce820dbce7181bbbf6812cfbd upstream.

This reverts commit 7291a932c6e27d9768e374e9d648086636daf61c.

The conversion to be16_add_cpu() is incorrect in case cryptlen is
negative due to premature (i.e. before addition / subtraction)
implicit conversion of cryptlen (int -&gt; u16) leading to sign loss.

Cc: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: talitos - avoid memleak in talitos_alg_alloc()</title>
<updated>2015-07-10T16:49:33+00:00</updated>
<author>
<name>Horia Geant?</name>
<email>horia.geanta@freescale.com</email>
</author>
<published>2015-05-11T17:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0e566fe9dea0750713fa267b5a0b23f0b78b26ea'/>
<id>0e566fe9dea0750713fa267b5a0b23f0b78b26ea</id>
<content type='text'>
commit 5fa7dadc898567ce14d6d6d427e7bd8ce6eb5d39 upstream.

Fixes: 1d11911a8c57 ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5fa7dadc898567ce14d6d6d427e7bd8ce6eb5d39 upstream.

Fixes: 1d11911a8c57 ("crypto: talitos - fix warning: 'alg' may be used uninitialized in this function")
Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2015-06-18T06:49:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-06-18T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=49fe9bcc507fc82fac17c5c1a2ff7f83e5a19c67'/>
<id>49fe9bcc507fc82fac17c5c1a2ff7f83e5a19c67</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - Crash in caam hash due to uninitialised buffer lengths.

   - Alignment issue in caam RNG that may lead to non-random output"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: caam - fix RNG buffer cache alignment
  crypto: caam - improve initalization for context state saves
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - Crash in caam hash due to uninitialised buffer lengths.

   - Alignment issue in caam RNG that may lead to non-random output"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: caam - fix RNG buffer cache alignment
  crypto: caam - improve initalization for context state saves
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: caam - fix RNG buffer cache alignment</title>
<updated>2015-06-16T06:20:38+00:00</updated>
<author>
<name>Steve Cornelius</name>
<email>steve.cornelius@freescale.com</email>
</author>
<published>2015-06-15T23:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=412c98c1bef65fe7589f1300e93735d96130307c'/>
<id>412c98c1bef65fe7589f1300e93735d96130307c</id>
<content type='text'>
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.

Cc: stable@vger.kernel.org
Signed-off-by: Steve Cornelius &lt;steve.cornelius@freescale.com&gt;
Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Cc: stable@vger.kernel.org
Signed-off-by: Steve Cornelius &lt;steve.cornelius@freescale.com&gt;
Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
