<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/crypto/caam, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-03-30T17:33:12+00:00</updated>
<entry>
<title>crypto: caam/qi - don't leak pointers to authenc keys</title>
<updated>2018-03-30T17:33:12+00:00</updated>
<author>
<name>Tudor-Dan Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2018-03-23T10:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc4ccaafcbddb88d661143c779af08d4ed8798ae'/>
<id>urn:sha1:cc4ccaafcbddb88d661143c779af08d4ed8798ae</id>
<content type='text'>
In caam/qi's aead_setkey we save pointers to the authenc keys in
a local variable of type struct crypto_authenc_keys and we don't
zeroize it after use. Fix this and don't leak pointers to the
authenc keys.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - don't leak pointers to authenc keys</title>
<updated>2018-03-30T17:33:11+00:00</updated>
<author>
<name>Tudor-Dan Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2018-03-23T10:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61dab9726050b0ffa826f1b540e9518768914b76'/>
<id>urn:sha1:61dab9726050b0ffa826f1b540e9518768914b76</id>
<content type='text'>
In caam's aead_setkey we save pointers to the authenc keys in a
local variable of type struct crypto_authenc_keys and we don't
zeroize it after use. Fix this and don't leak pointers to the
authenc keys.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - do not use mem and emi_slow clock for imx7x</title>
<updated>2018-03-02T16:03:40+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2018-02-22T14:22:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=699e491bac84a2069c7abeacf2f4367ecb19fa9c'/>
<id>urn:sha1:699e491bac84a2069c7abeacf2f4367ecb19fa9c</id>
<content type='text'>
I.MX7x only use two clocks for the CAAM module, so make sure we do not try to
use the mem and the emi_slow clock when running in that imx7d and imx7s machine
type.

Cc: "Horia Geantă" &lt;horia.geanta@nxp.com&gt;
Cc: Aymen Sghaier &lt;aymen.sghaier@nxp.com&gt;
Cc: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Fix null dereference at error path</title>
<updated>2018-03-02T16:03:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2018-02-22T14:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b85149f6f5d5a9279f29a73b2e95342f4d465e73'/>
<id>urn:sha1:b85149f6f5d5a9279f29a73b2e95342f4d465e73</id>
<content type='text'>
caam_remove already removes the debugfs entry, so we need to remove the one
immediately before calling caam_remove.

This fix a NULL dereference at error paths is caam_probe fail.

Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")

Tested-by: Ryan Harkin &lt;ryan.harkin@linaro.org&gt;
Cc: "Horia Geantă" &lt;horia.geanta@nxp.com&gt;
Cc: Aymen Sghaier &lt;aymen.sghaier@nxp.com&gt;
Cc: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Lukas Auer &lt;lukas.auer@aisec.fraunhofer.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 4.12+
Reviewed-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam/qi - add GCM support</title>
<updated>2018-02-15T15:26:55+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2018-01-29T08:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3e41b50b46b5ee26793c9c28ccc2d3e45f4f9cc'/>
<id>urn:sha1:d3e41b50b46b5ee26793c9c28ccc2d3e45f4f9cc</id>
<content type='text'>
Add support for AES working in Galois Counter Mode.
The following algorithms are added:
gcm(aes)
rfc4106(gcm(aes))
rfc4543(gcm(aes))

There is a limitation related to IV size, similar to the one present in
SW implementation (crypto/gcm.c):
The only IV size allowed is 12 bytes. It will be padded by HW to the right
with 0x0000_0001 (up to 16 bytes - AES block size), according to the
GCM specification.

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - prepare for gcm(aes) support over QI interface</title>
<updated>2018-02-15T15:26:53+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2018-01-29T08:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87ec3a0b1c2de80ffca532abb5d7acd18dc905e3'/>
<id>urn:sha1:87ec3a0b1c2de80ffca532abb5d7acd18dc905e3</id>
<content type='text'>
Update gcm(aes) descriptors (generic, rfc4106 and rfc4543) such that
they would also work when submitted via the QI interface.

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam/qi - return -EBADMSG for ICV check failure</title>
<updated>2018-02-15T15:26:53+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2018-01-29T08:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb3078f35b16b5346a90317d2d4ce2a577429d8a'/>
<id>urn:sha1:cb3078f35b16b5346a90317d2d4ce2a577429d8a</id>
<content type='text'>
Crypto drivers are expected to return -EBADMSG in case of
ICV check (authentication) failure.

In this case it also makes sense to suppress the error message
in the QI dequeue callback.

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - fix endless loop when DECO acquire fails</title>
<updated>2018-02-08T11:38:13+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2018-02-05T09:15:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=225ece3e7dad4cfc44cca38ce7a3a80f255ea8f1'/>
<id>urn:sha1:225ece3e7dad4cfc44cca38ce7a3a80f255ea8f1</id>
<content type='text'>
In case DECO0 cannot be acquired - i.e. run_descriptor_deco0() fails
with -ENODEV, caam_probe() enters an endless loop:

run_descriptor_deco0
	ret -ENODEV
	-&gt; instantiate_rng
		-ENODEV, overwritten by -EAGAIN
		ret -EAGAIN
		-&gt; caam_probe
			-EAGAIN results in endless loop

It turns out the error path in instantiate_rng() is incorrect,
the checks are done in the wrong order.

Cc: &lt;stable@vger.kernel.org&gt; # 3.13+
Fixes: 1005bccd7a4a6 ("crypto: caam - enable instantiation of all RNG4 state handles")
Reported-by: Bryan O'Donoghue &lt;pure.logic@nexus-software.ie&gt;
Suggested-by: Auer Lukas &lt;lukas.auer@aisec.fraunhofer.de&gt;
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - add Derived Key Protocol (DKP) support</title>
<updated>2017-12-28T06:56:48+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2017-12-19T10:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e0880b9fbbe7d21e29347020bef0b7329cb0e9d'/>
<id>urn:sha1:7e0880b9fbbe7d21e29347020bef0b7329cb0e9d</id>
<content type='text'>
Offload split key generation in CAAM engine, using DKP.
DKP is supported starting with Era 6.

Note that the way assoclen is transmitted from the job descriptor
to the shared descriptor changes - DPOVRD register is used instead
of MATH3 (where available), since DKP protocol thrashes the MATH
registers.

The replacement of MDHA split key generation with DKP has the side
effect of the crypto engine writing the authentication key, and thus
the DMA mapping direction for the buffer holding the key has to change
from DMA_TO_DEVICE to DMA_BIDIRECTIONAL.
There are two cases:
-key is inlined in descriptor - descriptor buffer mapping changes
-key is referenced - key buffer mapping changes

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - save Era in driver's private data</title>
<updated>2017-12-28T06:56:47+00:00</updated>
<author>
<name>Horia Geantă</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2017-12-19T10:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9fe712df08ea805868789bb6800f2226f5fd5285'/>
<id>urn:sha1:9fe712df08ea805868789bb6800f2226f5fd5285</id>
<content type='text'>
Save Era in driver's private data for further usage,
like deciding whether an erratum applies or a feature is available
based on its value.

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
