<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/caam/caamhash.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-05T20:17:07Z</updated>
<entry>
<title>crypto: caam - fix asynchronous hash</title>
<updated>2024-02-05T20:17:07Z</updated>
<author>
<name>Gaurav Jain</name>
</author>
<published>2024-01-18T09:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cb0d682a8b0cd196a88e90398157430793efdbd'/>
<id>urn:sha1:1cb0d682a8b0cd196a88e90398157430793efdbd</id>
<content type='text'>
[ Upstream commit c5a2f74db71a849f3a60bc153d684d6d28a0c665 ]

ahash_alg-&gt;setkey is updated to ahash_nosetkey in ahash.c
so checking setkey() function to determine hmac algorithm is not valid.

to fix this added is_hmac variable in structure caam_hash_alg to determine
whether the algorithm is hmac or not.

Fixes: 2f1f34c1bf7b ("crypto: ahash - optimize performance when wrapping shash")
Signed-off-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Use new crypto_engine_op interface</title>
<updated>2023-08-18T09:01:10Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2023-08-13T06:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=623814c0408771399c4209db73f60685f7cf1d14'/>
<id>urn:sha1:623814c0408771399c4209db73f60685f7cf1d14</id>
<content type='text'>
Use the new crypto_engine_op interface where the callback is stored
in the algorithm object.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Include internal/engine.h</title>
<updated>2023-08-18T09:01:10Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2023-08-13T06:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ac1a2d88d8ff2b7d6decb40f712bf9ffddcd8c9'/>
<id>urn:sha1:4ac1a2d88d8ff2b7d6decb40f712bf9ffddcd8c9</id>
<content type='text'>
Inlucde internal/engine.h because this driver uses directly
accesses attributes inside struct crypto_engine.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Remove messages related to memory allocation failure</title>
<updated>2023-07-28T10:20:25Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2023-07-22T14:53:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3de0152bf26ff0c5083ef831ba7676fc4c92e63a'/>
<id>urn:sha1:3de0152bf26ff0c5083ef831ba7676fc4c92e63a</id>
<content type='text'>
On memory allocation failure, the function calling stack is already logged.
So there is no need to explicitly log an extra message.

Remove them, ans simplify some code accordingly.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Use struct_size()</title>
<updated>2023-07-28T10:20:25Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2023-07-22T14:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6df04505f3b285f3bcfe81cf0461339b0f4ed41d'/>
<id>urn:sha1:6df04505f3b285f3bcfe81cf0461339b0f4ed41d</id>
<content type='text'>
Use struct_size() instead of hand-writing it, when allocating a structure
with a flex array.

This is less verbose, more robust and more informative.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - reduce page 0 regs access to minimum</title>
<updated>2023-04-14T10:59:34Z</updated>
<author>
<name>Horia GeantA</name>
</author>
<published>2023-04-05T09:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae1dd17daeb8193b1ea3665c89ade63cf7385182'/>
<id>urn:sha1:ae1dd17daeb8193b1ea3665c89ade63cf7385182</id>
<content type='text'>
Use job ring register map, in place of controller register map
to access page 0 registers, as access to the controller register
map is not permitted.

Signed-off-by: Horia GeantA &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Varun Sethi &lt;v.sethi@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Use ahash_request_complete</title>
<updated>2023-01-27T10:58:09Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2023-01-22T07:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4bc713a49d7f97f7328e5a595b8f5d231d9ebfca'/>
<id>urn:sha1:4bc713a49d7f97f7328e5a595b8f5d231d9ebfca</id>
<content type='text'>
Instead of calling the base completion function directly, use the
correct ahash helper which is ahash_request_complete.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Remove GFP_DMA and add DMA alignment padding</title>
<updated>2023-01-06T09:15:47Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2022-12-30T05:21:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=199354d7fb6eaa2cc5bb650af0bca624baffee35'/>
<id>urn:sha1:199354d7fb6eaa2cc5bb650af0bca624baffee35</id>
<content type='text'>
GFP_DMA does not guarantee that the returned memory is aligned
for DMA.  It should be removed where it is superfluous.

However, kmalloc may start returning DMA-unaligned memory in future
so fix this by adding the alignment by hand.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Set DMA alignment explicitly</title>
<updated>2022-12-02T10:12:41Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2022-11-25T04:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cb4f7c11deef5222ac15631b16ab54625b926b3'/>
<id>urn:sha1:4cb4f7c11deef5222ac15631b16ab54625b926b3</id>
<content type='text'>
This driver has been implicitly relying on kmalloc alignment
to be sufficient for DMA.  This may no longer be the case with
upcoming arm64 changes.

This patch changes it to explicitly request DMA alignment from
the Crypto API.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - save caam memory to support crypto engine retry mechanism.</title>
<updated>2021-12-03T04:56:17Z</updated>
<author>
<name>Gaurav Jain</name>
</author>
<published>2021-11-22T11:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=087e1d715bccf25dc0e83294576e416b0386ba20'/>
<id>urn:sha1:087e1d715bccf25dc0e83294576e416b0386ba20</id>
<content type='text'>
When caam queue is full (-ENOSPC), caam frees descriptor memory.
crypto-engine checks if retry support is true and h/w queue
is full(-ENOSPC), then requeue the crypto request.
During processing the requested descriptor again, caam gives below error.
(caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command).

This patch adds a check to return when caam input ring is full
and retry support is true. so descriptor memory is not freed
and requeued request can be processed again.

Fixes: 2d653936eb2cf ("crypto: caam - enable crypto-engine retry mechanism")
Signed-off-by: Gaurav Jain &lt;gaurav.jain@nxp.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>
</feed>
