<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/crypto, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-21T04:19:53Z</updated>
<entry>
<title>crypto: qat - make qat_asym_algs.o depend on asn1 headers</title>
<updated>2016-07-21T04:19:53Z</updated>
<author>
<name>Jan Stancek</name>
<email>jstancek@redhat.com</email>
</author>
<published>2016-06-30T10:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81dc0365cfa7bc7c08a0e44d9ee04964df782e19'/>
<id>urn:sha1:81dc0365cfa7bc7c08a0e44d9ee04964df782e19</id>
<content type='text'>
Parallel build can sporadically fail because asn1 headers may
not be built yet by the time qat_asym_algs.o is compiled:
  drivers/crypto/qat/qat_common/qat_asym_algs.c:55:32: fatal error: qat_rsapubkey-asn1.h: No such file or directory
   #include "qat_rsapubkey-asn1.h"

Cc: stable@vger.kernel.org
Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ux500 - memmove the right size</title>
<updated>2016-06-13T09:43:05Z</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2016-06-08T12:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19ced623db2fe91604d69f7d86b03144c5107739'/>
<id>urn:sha1:19ced623db2fe91604d69f7d86b03144c5107739</id>
<content type='text'>
The hash buffer is really HASH_BLOCK_SIZE bytes, someone
must have thought that memmove takes n*u32 words by mistake.
Tests work as good/bad as before after this patch.

Cc: Joakim Bech &lt;joakim.bech@linaro.org&gt;
Cc: stable@vger.kernel.org
Reported-by: David Binderman &lt;linuxdev.baldrick@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: vmx - Increase priority of aes-cbc cipher</title>
<updated>2016-06-13T09:43:05Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2016-06-10T06:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12d3f49e1ffbbf8cbbb60acae5a21103c5c841ac'/>
<id>urn:sha1:12d3f49e1ffbbf8cbbb60acae5a21103c5c841ac</id>
<content type='text'>
All of the VMX AES ciphers (AES, AES-CBC and AES-CTR) are set at
priority 1000. Unfortunately this means we never use AES-CBC and
AES-CTR, because the base AES-CBC cipher that is implemented on
top of AES inherits its priority.

To fix this, AES-CBC and AES-CTR have to be a higher priority. Set
them to 2000.

Testing on a POWER8 with:

cryptsetup benchmark --cipher aes --key-size 256

Shows decryption speed increase from 402.4 MB/s to 3069.2 MB/s,
over 7x faster. Thanks to Mike Strosaker for helping me debug
this issue.

Fixes: 8c755ace357c ("crypto: vmx - Adding CBC routines for VMX module")
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: vmx - Fix ABI detection</title>
<updated>2016-06-13T09:43:04Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2016-06-10T06:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=975f57fdff1d0eb9816806cabd27162a8a1a4038'/>
<id>urn:sha1:975f57fdff1d0eb9816806cabd27162a8a1a4038</id>
<content type='text'>
When calling ppc-xlate.pl, we pass it either linux-ppc64 or
linux-ppc64le. The script however was expecting linux64le, a result
of its OpenSSL origins. This means we aren't obeying the ppc64le
ABIv2 rules.

Fix this by checking for linux-ppc64le.

Fixes: 5ca55738201c ("crypto: vmx - comply with ABIs that specify vrsave as reserved.")
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard &lt;anton@samba.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-05-30T22:20:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-30T22:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=446985428d2cd10efd5d139c33de16c50ee771ba'/>
<id>urn:sha1:446985428d2cd10efd5d139c33de16c50ee771ba</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - missing selection in public_key that may result in a build failure

   - Potential crash in error path in omap-sham

   - ccp AES XTS bug that affects requests larger than 4096"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ccp - Fix AES XTS error for request sizes above 4096
  crypto: public_key: select CRYPTO_AKCIPHER
  crypto: omap-sham - potential Oops on error in probe
</content>
</entry>
<entry>
<title>remove lots of IS_ERR_VALUE abuses</title>
<updated>2016-05-27T22:26:11Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-05-27T21:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=287980e49ffc0f6d911601e7e352a812ed27768e'/>
<id>urn:sha1:287980e49ffc0f6d911601e7e352a812ed27768e</id>
<content type='text'>
Most users of IS_ERR_VALUE() in the kernel are wrong, as they
pass an 'int' into a function that takes an 'unsigned long'
argument. This happens to work because the type is sign-extended
on 64-bit architectures before it gets converted into an
unsigned type.

However, anything that passes an 'unsigned short' or 'unsigned int'
argument into IS_ERR_VALUE() is guaranteed to be broken, as are
8-bit integers and types that are wider than 'unsigned long'.

Andrzej Hajda has already fixed a lot of the worst abusers that
were causing actual bugs, but it would be nice to prevent any
users that are not passing 'unsigned long' arguments.

This patch changes all users of IS_ERR_VALUE() that I could find
on 32-bit ARM randconfig builds and x86 allmodconfig. For the
moment, this doesn't change the definition of IS_ERR_VALUE()
because there are probably still architecture specific users
elsewhere.

Almost all the warnings I got are for files that are better off
using 'if (err)' or 'if (err &lt; 0)'.
The only legitimate user I could find that we get a warning for
is the (32-bit only) freescale fman driver, so I did not remove
the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
For 9pfs, I just worked around one user whose calling conventions
are so obscure that I did not dare change the behavior.

I was using this definition for testing:

 #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL &amp;&amp; \
       unlikely((unsigned long long)(x) &gt;= (unsigned long long)(typeof(x))-MAX_ERRNO))

which ends up making all 16-bit or wider types work correctly with
the most plausible interpretation of what IS_ERR_VALUE() was supposed
to return according to its users, but also causes a compile-time
warning for any users that do not pass an 'unsigned long' argument.

I suggested this approach earlier this year, but back then we ended
up deciding to just fix the users that are obviously broken. After
the initial warning that caused me to get involved in the discussion
(fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
asked me to send the whole thing again.

[ Updated the 9p parts as per Al Viro  - Linus ]

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://lkml.org/lkml/2016/1/7/363
Link: https://lkml.org/lkml/2016/5/27/486
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt; # For nvmem part
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Fix AES XTS error for request sizes above 4096</title>
<updated>2016-05-25T10:33:47Z</updated>
<author>
<name>Tom Lendacky</name>
<email>thomas.lendacky@amd.com</email>
</author>
<published>2016-05-20T22:33:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab6a11a7c8ef47f996974dd3c648c2c0b1a36ab1'/>
<id>urn:sha1:ab6a11a7c8ef47f996974dd3c648c2c0b1a36ab1</id>
<content type='text'>
The ccp-crypto module for AES XTS support has a bug that can allow requests
greater than 4096 bytes in size to be passed to the CCP hardware. The CCP
hardware does not support request sizes larger than 4096, resulting in
incorrect output. The request should actually be handled by the fallback
mechanism instantiated by the ccp-crypto module.

Add a check to insure the request size is less than or equal to the maximum
supported size and use the fallback mechanism if it is not.

Cc: &lt;stable@vger.kernel.org&gt; # 3.14.x-
Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: omap-sham - potential Oops on error in probe</title>
<updated>2016-05-19T10:03:00Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-05-18T10:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d462e32259810aaaf13440b033b99e1aad33eccd'/>
<id>urn:sha1:d462e32259810aaaf13440b033b99e1aad33eccd</id>
<content type='text'>
This if statement is reversed so we end up either leaking or Oopsing on
error.

Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: qat - change the adf_ctl_stop_devices to void</title>
<updated>2016-05-13T09:30:18Z</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2016-05-11T20:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=256b1cfb9a346bb4808cd27b7b8f9b120f96491e'/>
<id>urn:sha1:256b1cfb9a346bb4808cd27b7b8f9b120f96491e</id>
<content type='text'>
Change the adf_ctl_stop_devices to a void function.

Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - fix caam_jr_alloc() ret code</title>
<updated>2016-05-10T09:49:21Z</updated>
<author>
<name>Catalin Vasile</name>
<email>cata.vasile@nxp.com</email>
</author>
<published>2016-05-06T13:18:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e930c765ca5c6b039cd22ebfb4504ea7b5dab43d'/>
<id>urn:sha1:e930c765ca5c6b039cd22ebfb4504ea7b5dab43d</id>
<content type='text'>
caam_jr_alloc() used to return NULL if a JR device could not be
allocated for a session. In turn, every user of this function used
IS_ERR() function to verify if anything went wrong, which does NOT look
for NULL values. This made the kernel crash if the sanity check failed,
because the driver continued to think it had allocated a valid JR dev
instance to the session and at some point it tries to do a caam_jr_free()
on a NULL JR dev pointer.
This patch is a fix for this issue.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Catalin Vasile &lt;cata.vasile@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
