<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/caam/caamalg.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-09-15T06:20:29Z</updated>
<entry>
<title>crypto: caam - fix IV loading for authenc (giv)decryption</title>
<updated>2016-09-15T06:20:29Z</updated>
<author>
<name>Horia Geantă</name>
</author>
<published>2016-08-29T11:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c488abc98a8a164a1ec264a4823a7e4baf587fc4'/>
<id>urn:sha1:c488abc98a8a164a1ec264a4823a7e4baf587fc4</id>
<content type='text'>
commit 8b18e2359aff2ab810aba84cebffc9da07fef78f upstream.

For algorithms that implement IV generators before the crypto ops,
the IV needed for decryption is initially located in req-&gt;src
scatterlist, not in req-&gt;iv.

Avoid copying the IV into req-&gt;iv by modifying the (givdecrypt)
descriptors to load it directly from req-&gt;src.
aead_givdecrypt() is no longer needed and goes away.

Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface")
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.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: caam - defer aead_set_sh_desc in case of zero authsize</title>
<updated>2016-09-07T06:34:45Z</updated>
<author>
<name>Horia Geantă</name>
</author>
<published>2016-08-04T17:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24d5f2420a327696585d092c4cdb59eb527dbc63'/>
<id>urn:sha1:24d5f2420a327696585d092c4cdb59eb527dbc63</id>
<content type='text'>
commit 2fdea258fde036a87d3396ec9c0ef66f10768530 upstream.

To be able to generate shared descriptors for AEAD, the authentication size
needs to be known. However, there is no imposed order of calling .setkey,
.setauthsize callbacks.

Thus, in case authentication size is not known at .setkey time, defer it
until .setauthsize is called.

The authsize != 0 check was incorrectly removed when converting the driver
to the new AEAD interface.

Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface")
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.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: caam - fix echainiv(authenc) encrypt shared descriptor</title>
<updated>2016-09-07T06:34:45Z</updated>
<author>
<name>Horia Geantă</name>
</author>
<published>2016-08-04T17:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf84cfceb14405d8a3b1a8b774957db17bdb3e1a'/>
<id>urn:sha1:cf84cfceb14405d8a3b1a8b774957db17bdb3e1a</id>
<content type='text'>
commit 1d2d87e81ea21f64c19b95ef228b865a6880e17e upstream.

There are a few things missed by the conversion to the
new AEAD interface:

1 - echainiv(authenc) encrypt shared descriptor

The shared descriptor is incorrect: due to the order of operations,
at some point in time MATH3 register is being overwritten.

2 - buffer used for echainiv(authenc) encrypt shared descriptor

Encrypt and givencrypt shared descriptors (for AEAD ops) are mutually
exclusive and thus use the same buffer in context state: sh_desc_enc.

However, there's one place missed by s/sh_desc_givenc/sh_desc_enc,
leading to errors when echainiv(authenc(...)) algorithms are used:
DECO: desc idx 14: Header Error. Invalid length or parity, or
certain other problems.

While here, also fix a typo: dma_mapping_error() is checking
for validity of sh_desc_givenc_dma instead of sh_desc_enc_dma.

Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface")
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.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: caam - add support for acipher xts(aes)</title>
<updated>2015-10-08T13:42:20Z</updated>
<author>
<name>Catalin Vasile</name>
</author>
<published>2015-10-02T10:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6415a6016bff0b547c13cadb1d5e50e9ace2be3'/>
<id>urn:sha1:c6415a6016bff0b547c13cadb1d5e50e9ace2be3</id>
<content type='text'>
Add support for AES working in XEX-based Tweaked-codebook mode with
ciphertext Stealing (XTS)

sector index - HW limitation: CAAM device supports sector index of only
8 bytes to be used for sector index inside IV, instead of whole 16 bytes
received on request. This represents 2 ^ 64 = 16,777,216 Tera of possible
values for sector index.

Signed-off-by: Cristian Hristea &lt;cristi.hristea@gmail.com&gt;
Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Alex Porosanu &lt;alexandru.porosanu@freescale.com&gt;
Signed-off-by: Catalin Vasile &lt;catalin.vasile@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - dma_map_sg can handle chained SG</title>
<updated>2015-10-01T13:56:56Z</updated>
<author>
<name>LABBE Corentin</name>
</author>
<published>2015-09-23T11:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13fb8fd7a81923f7a64b4e688fe0bdaf1ea26adf'/>
<id>urn:sha1:13fb8fd7a81923f7a64b4e688fe0bdaf1ea26adf</id>
<content type='text'>
The caam driver use two dma_map_sg path according to SG are chained
or not.
Since dma_map_sg can handle both case, clean the code with all
references to sg chained.

Thus removing dma_map_sg_chained, dma_unmap_sg_chained
and __sg_count functions.

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Use the preferred style for memory allocations</title>
<updated>2015-08-24T14:07:42Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2015-08-21T16:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c4f9733e26f0d6977096fcafe71ea2ba9f0cd7c'/>
<id>urn:sha1:9c4f9733e26f0d6977096fcafe71ea2ba9f0cd7c</id>
<content type='text'>
"The preferred form for passing a size of a struct is the following:

        p = kmalloc(sizeof(*p), ...);
....

The preferred form for allocating a zeroed array is the following:

        p = kcalloc(n, sizeof(...), ...); "

,so do as suggested.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Horia Geant? &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag</title>
<updated>2015-08-17T08:53:53Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2015-08-13T09:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e4b8c1fcc70016f43926203ae1820c3b380d5cd'/>
<id>urn:sha1:5e4b8c1fcc70016f43926203ae1820c3b380d5cd</id>
<content type='text'>
This patch removes the CRYPTO_ALG_AEAD_NEW flag now that everyone
has been converted.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Detect hardware features during algorithm registration</title>
<updated>2015-08-10T15:19:04Z</updated>
<author>
<name>Victoria Milhoan</name>
</author>
<published>2015-08-05T18:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf83490ee4207de3af59b63870eb9f72f1e523f1'/>
<id>urn:sha1:bf83490ee4207de3af59b63870eb9f72f1e523f1</id>
<content type='text'>
Register only algorithms supported by CAAM hardware, using the CHA
version and instantiation registers to identify hardware capabilities.

Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Tested-by: Horia Geantă &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Change kmalloc to kzalloc to avoid residual data</title>
<updated>2015-08-10T15:18:58Z</updated>
<author>
<name>Victoria Milhoan</name>
</author>
<published>2015-08-05T18:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dde20ae9d63835178ef4ba9655f530e052c08ab9'/>
<id>urn:sha1:dde20ae9d63835178ef4ba9655f530e052c08ab9</id>
<content type='text'>
Since fields must be ORed in to operate correctly using any order of
operations, changed allocations of the combination of extended
descriptor structs + hardware scatterlists to use kzalloc() instead
of kmalloc(), so as to ensure that residue data would not be ORed in
with the correct data.

Signed-off-by: Steve Cornelius &lt;steve.cornelius@freescale.com&gt;
Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Tested-by: Horia Geantă &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Convert authenc to new AEAD interface</title>
<updated>2015-08-04T12:45:31Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2015-07-30T09:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=479bcc7c5b9e1cbf3278462d786c37e468d5d404'/>
<id>urn:sha1:479bcc7c5b9e1cbf3278462d786c37e468d5d404</id>
<content type='text'>
This patch converts the authenc implementations in caam to the
new AEAD interface.  The biggest change is that seqiv no longer
generates a random IV.  Instead the IPsec sequence number is used
as the IV.

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