<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/crypto/marvell, branch v4.11.5</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.11.5'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-12-28T01:51:36+00:00</updated>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-12-28T01:51:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-28T01:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d706e790f0508dff4fb72eca9b4892b79757feb'/>
<id>urn:sha1:2d706e790f0508dff4fb72eca9b4892b79757feb</id>
<content type='text'>
Pull crypto fix from Herbert Xu:
 "This fixes a hash corruption bug in the marvell driver"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: marvell - Copy IVDIG before launching partial DMA ahash requests
</content>
</entry>
<entry>
<title>crypto: marvell - Copy IVDIG before launching partial DMA ahash requests</title>
<updated>2016-12-16T11:59:39+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-12-14T14:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8759fec4af222f338d08f8f1a7ad6a77ca6cb301'/>
<id>urn:sha1:8759fec4af222f338d08f8f1a7ad6a77ca6cb301</id>
<content type='text'>
Currently, inner IV/DIGEST data are only copied once into the hash
engines and not set explicitly before launching a request that is not a
first frag. This is an issue especially when multiple ahash reqs are
computed in parallel or chained with cipher request, as the state of the
request being computed is not updated into the hash engine. It leads to
non-deterministic corrupted digest results.

Fixes: commit 2786cee8e50b ("crypto: marvell - Move SRAM I/O operations to step functions")
Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-12-14T21:31:29+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-14T21:31:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f1d6dfe03ca4e36132221b918499c6f0b0f048d'/>
<id>urn:sha1:0f1d6dfe03ca4e36132221b918499c6f0b0f048d</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "Here is the crypto update for 4.10:

  API:
   - add skcipher walk interface
   - add asynchronous compression (acomp) interface
   - fix algif_aed AIO handling of zero buffer

  Algorithms:
   - fix unaligned access in poly1305
   - fix DRBG output to large buffers

  Drivers:
   - add support for iMX6UL to caam
   - fix givenc descriptors (used by IPsec) in caam
   - accelerated SHA256/SHA512 for ARM64 from OpenSSL
   - add SSE CRCT10DIF and CRC32 to ARM/ARM64
   - add AEAD support to Chelsio chcr
   - add Armada 8K support to omap-rng"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (148 commits)
  crypto: testmgr - fix overlap in chunked tests again
  crypto: arm/crc32 - accelerated support based on x86 SSE implementation
  crypto: arm64/crc32 - accelerated support based on x86 SSE implementation
  crypto: arm/crct10dif - port x86 SSE implementation to ARM
  crypto: arm64/crct10dif - port x86 SSE implementation to arm64
  crypto: testmgr - add/enhance test cases for CRC-T10DIF
  crypto: testmgr - avoid overlap in chunked tests
  crypto: chcr - checking for IS_ERR() instead of NULL
  crypto: caam - check caam_emi_slow instead of re-lookup platform
  crypto: algif_aead - fix AIO handling of zero buffer
  crypto: aes-ce - Make aes_simd_algs static
  crypto: algif_skcipher - set error code when kcalloc fails
  crypto: caam - make aamalg_desc a proper module
  crypto: caam - pass key buffers with typesafe pointers
  crypto: arm64/aes-ce-ccm - Fix AEAD decryption length
  MAINTAINERS: add crypto headers to crypto entry
  crypt: doc - remove misleading mention of async API
  crypto: doc - fix header file name
  crypto: api - fix comment typo
  crypto: skcipher - Add separate walker for AEAD decryption
  ..
</content>
</entry>
<entry>
<title>crypto: marvell - Don't corrupt state of an STD req for re-stepped ahash</title>
<updated>2016-12-07T11:55:17+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-12-05T08:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e5f7a149e00d211177f6de8be427ebc72a1c363'/>
<id>urn:sha1:9e5f7a149e00d211177f6de8be427ebc72a1c363</id>
<content type='text'>
mv_cesa_hash_std_step() copies the creq-&gt;state into the SRAM at each
step, but this is only required on the first one. By doing that, we
overwrite the engine state, and get erroneous results when the crypto
request is split in several chunks to fit in the internal SRAM.

This commit changes the function to copy the state only on the first
step.

Fixes: commit 2786cee8e50b ("crypto: marvell - Move SRAM I/O op...")
Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Don't copy hash operation twice into the SRAM</title>
<updated>2016-12-07T11:55:16+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-12-05T08:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68c7f8c1c4e9b06e6b153fa3e9e0cda2ef5aaed8'/>
<id>urn:sha1:68c7f8c1c4e9b06e6b153fa3e9e0cda2ef5aaed8</id>
<content type='text'>
No need to copy the template of an hash operation twice into the SRAM
from the step function.

Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...")
Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Don't break chain for computable last ahash requests</title>
<updated>2016-10-21T03:03:40+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-10-05T07:56:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f34dad1721642989336283c9e6c3b8f6b23fa67c'/>
<id>urn:sha1:f34dad1721642989336283c9e6c3b8f6b23fa67c</id>
<content type='text'>
Currently, the driver breaks chain for all kind of hash requests in order to
don't override intermediate states of partial ahash updates. However, some final
ahash requests can be directly processed by the engine, and so without
intermediate state. This is typically the case for most for the HMAC requests
processed via IPSec.

This commits adds a TDMA descriptor to copy context for these of requests
into the "op" dma pool, then it allow to chain these requests at the DMA level.
The 'complete' operation is also updated to retrieve the MAC digest from the
right location.

Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Use an unique pool to copy results of requests</title>
<updated>2016-10-21T03:03:40+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-10-05T07:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c99620f0ac13a51f2f78cf62e6b551a09f8b1f1'/>
<id>urn:sha1:0c99620f0ac13a51f2f78cf62e6b551a09f8b1f1</id>
<content type='text'>
So far, we used a dedicated dma pool to copy the result of outer IV for
cipher requests. Instead of using a dma pool per outer data, we prefer
use the op dma pool that contains all part of the request from the SRAM.
Then, the outer data that is likely to be used by the 'complete'
operation, is copied later. In this way, any type of result can be
retrieved by DMA for cipher or ahash requests.

Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Don't hardcode block size in mv_cesa_ahash_cache_req</title>
<updated>2016-08-09T10:47:31+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-08-09T09:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=47856204146ba6fd0f198dbb23c4ed7ad1c3fd99'/>
<id>urn:sha1:47856204146ba6fd0f198dbb23c4ed7ad1c3fd99</id>
<content type='text'>
Don't use 64 'as is', as max block size in mv_cesa_ahash_cache_req. Use
CESA_MAX_HASH_BLOCK_SIZE instead, this is better for readability.

Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Don't overwrite default creq-&gt;state during initialization</title>
<updated>2016-08-09T10:47:31+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-08-09T09:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57cfda1ac74e58767f6305bd1ea3449177425460'/>
<id>urn:sha1:57cfda1ac74e58767f6305bd1ea3449177425460</id>
<content type='text'>
Currently, in mv_cesa_{md5,sha1,sha256}_init creq-&gt;state is initialized
before the call to mv_cesa_ahash_init. This is wrong because this
function fills creq with zero by using memset, so its 'state' that
contains the default DIGEST is overwritten. This commit fixes the issue
by initializing creq-&gt;state just after the call to mv_cesa_ahash_init.

Fixes: commit b0ef51067cb4 ("crypto: marvell/cesa - initialize hash...")
Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell - Update transformation context for each dequeued req</title>
<updated>2016-08-09T10:47:30+00:00</updated>
<author>
<name>Romain Perier</name>
<email>romain.perier@free-electrons.com</email>
</author>
<published>2016-08-09T09:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09951d83fc58a6f772de09c08e370f6d9970dbb6'/>
<id>urn:sha1:09951d83fc58a6f772de09c08e370f6d9970dbb6</id>
<content type='text'>
So far, sub part of mv_cesa_int was responsible of dequeuing complete
requests, then call the 'cleanup' operation on these reqs and call the
crypto api callback 'complete'. The problem is that the transformation
context 'ctx' is retrieved only once before the while loop. Which means
that the wrong 'cleanup' operation might be called on the wrong type of
cesa requests, it can lead to memory corruptions with this message:

marvell-cesa f1090000.crypto: dma_pool_free cesa_padding, 5a5a5a5a/5a5a5a5a (bad dma)

This commit fixes the issue, by updating the transformation context for
each dequeued cesa request.

Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...")
Signed-off-by: Romain Perier &lt;romain.perier@free-electrons.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
