<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/ccree/cc_buffer_mgr.c, branch linux-5.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-04-17T14:13:40Z</updated>
<entry>
<title>crypto: ccree - dec auth tag size from cryptlen map</title>
<updated>2020-04-17T14:13:40Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2020-02-02T16:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7752e7c0fc1dee32a3a6353de69bcbc37badac2b'/>
<id>urn:sha1:7752e7c0fc1dee32a3a6353de69bcbc37badac2b</id>
<content type='text'>
commit 8962c6d2c2b8ca51b0f188109015b15fc5f4da44 upstream.

Remove the auth tag size from cryptlen before mapping the destination
in out-of-place AEAD decryption thus resolving a crash with
extended testmgr tests.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: stable@vger.kernel.org # v4.19+
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&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>
</entry>
<entry>
<title>crypto: ccree - only try to map auth tag if needed</title>
<updated>2020-04-17T14:13:40Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2020-01-29T14:37:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a812dd1e1a691b34b7a4be797ff5bcb61579b0f'/>
<id>urn:sha1:4a812dd1e1a691b34b7a4be797ff5bcb61579b0f</id>
<content type='text'>
commit 504e84abec7a635b861afd8d7f92ecd13eaa2b09 upstream.

Make sure to only add the size of the auth tag to the source mapping
for encryption if it is an in-place operation. Failing to do this
previously caused us to try and map auth size len bytes from a NULL
mapping and crashing if both the cryptlen and assoclen are zero.

Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: ccree - protect against empty or NULL scatterlists</title>
<updated>2020-04-17T14:13:39Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2020-01-29T14:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d980ce4c0e73b8c2fdee1744bd22e45dd9eedf7'/>
<id>urn:sha1:4d980ce4c0e73b8c2fdee1744bd22e45dd9eedf7</id>
<content type='text'>
commit ce0fc6db38decf0d2919bfe783de6d6b76e421a9 upstream.

Deal gracefully with a NULL or empty scatterlist which can happen
if both cryptlen and assoclen are zero and we're doing in-place
AEAD encryption.

This fixes a crash when this causes us to try and map a NULL page,
at least with some platforms / DMA mapping configs.

Cc: stable@vger.kernel.org # v4.19+
Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.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>
</entry>
<entry>
<title>crypto: ccree - use std api sg_zero_buffer</title>
<updated>2019-08-09T05:05:31Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-07-29T10:40:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e88b27c8eaa8f3126791778803dd2fdd81828f5c'/>
<id>urn:sha1:e88b27c8eaa8f3126791778803dd2fdd81828f5c</id>
<content type='text'>
Replace internal cc_zero_sgl() with kernel API of the same function
sg_zero_buffer().

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - don't map AEAD key and IV on stack</title>
<updated>2019-04-25T07:38:16Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8662a6a5f8f7f2cadc0edb934aef622d96ac3ee'/>
<id>urn:sha1:e8662a6a5f8f7f2cadc0edb934aef622d96ac3ee</id>
<content type='text'>
The AEAD authenc key and IVs might be passed to us on stack. Copy it to
a slab buffer before mapping to gurantee proper DMA mapping.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - zap entire sg on aead request unmap</title>
<updated>2019-04-25T07:38:15Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05c292afb0c0545c0cf084172db13e544eeb8f56'/>
<id>urn:sha1:05c292afb0c0545c0cf084172db13e544eeb8f56</id>
<content type='text'>
We were trying to be clever zapping out of the cache only the required
length out of scatter list on AEAD request completion and getting it
wrong.

As Knuth said: "when in douby, use brute force". Zap the whole length of
the scatter list.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - make AEAD sgl iterator well behaved</title>
<updated>2019-04-25T07:38:15Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c776f7d37b6bf3663c838b2d2223f8ec1b523b12'/>
<id>urn:sha1:c776f7d37b6bf3663c838b2d2223f8ec1b523b12</id>
<content type='text'>
Fix some scatter list interation code was not handling scatter lists
being shorter than expected in a graceful manner.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - don't mangle the request assoclen</title>
<updated>2019-04-25T07:38:15Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da3cf67f1bcf25b069a54ff70fd108860242c8f7'/>
<id>urn:sha1:da3cf67f1bcf25b069a54ff70fd108860242c8f7</id>
<content type='text'>
We were mangling the request struct assoclen field.
Fix it by keeping an internal version and working on it.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - simplify AEAD ICV addr calculation</title>
<updated>2019-04-25T07:38:15Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9877cbc83b6ee2f5b0006b3837a3c63569bc122'/>
<id>urn:sha1:c9877cbc83b6ee2f5b0006b3837a3c63569bc122</id>
<content type='text'>
The function cc_prepare_aead_data_dlli() which calculates ICV addresses
was needlessly complicate it. This patch simplifies it without altering
its functionality.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccree - simplify fragment ICV detection</title>
<updated>2019-04-25T07:38:15Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2019-04-18T13:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6825cfd6d6f0054ddc35e220dadb3112350b05ae'/>
<id>urn:sha1:6825cfd6d6f0054ddc35e220dadb3112350b05ae</id>
<content type='text'>
The code detecting whether the ICV is fragmented was overly
complex and limited the number of fragments an ICV may be
comprised of with no reason in the current code, casuing the
new testmgr tests to fail.

This patch removes this legacy limitation and greatly simplifies
the code.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
