<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/crypto/authenc.c, branch v3.12.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-12-12T06:37:52Z</updated>
<entry>
<title>crypto: authenc - Find proper IV address in ablkcipher callback</title>
<updated>2013-12-12T06:37:52Z</updated>
<author>
<name>Tom Lendacky</name>
<email>thomas.lendacky@amd.com</email>
</author>
<published>2013-11-12T17:46:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f9cfbce8ee739a3f08c1a345417a3e049a423ae'/>
<id>urn:sha1:9f9cfbce8ee739a3f08c1a345417a3e049a423ae</id>
<content type='text'>
commit fc019c7122dfcd69c50142b57a735539aec5da95 upstream.

When performing an asynchronous ablkcipher operation the authenc
completion callback routine is invoked, but it does not locate and use
the proper IV.

The callback routine, crypto_authenc_encrypt_done, is updated to use
the same method of calculating the address of the IV as is done in
crypto_authenc_encrypt function which sets up the callback.

Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.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: use ERR_CAST</title>
<updated>2013-02-04T13:16:53Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2013-01-22T11:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3e8afe35c36fa0e928e038667709966a71a9cfa5'/>
<id>urn:sha1:3e8afe35c36fa0e928e038667709966a71a9cfa5</id>
<content type='text'>
Replace PTR_ERR followed by ERR_PTR by ERR_CAST, to be more concise.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression err,x;
@@
-       err = PTR_ERR(x);
        if (IS_ERR(x))
-                return ERR_PTR(err);
+                return ERR_CAST(x);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Fix crash with zero-length assoc data</title>
<updated>2012-09-11T04:05:45Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2012-09-11T04:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9b2f4cb65f7083cde86553cd56d6c2878e04932a'/>
<id>urn:sha1:9b2f4cb65f7083cde86553cd56d6c2878e04932a</id>
<content type='text'>
The authenc code doesn't deal with zero-length associated data
correctly and ends up constructing a zero-length sg entry which
causes a crash when it's fed into the crypto system.

This patch fixes this by avoiding the code-path that triggers
the SG construction if we have no associated data.

This isn't the most optimal fix as it means that we'll end up
using the fallback code-path even when we could still execute
the digest function.  However, this isn't a big deal as nobody
but the test path would supply zero-length associated data.

Reported-by: Romain Francoise &lt;romain@orebokech.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Tested-by: Romain Francoise &lt;romain@orebokech.com&gt;
</content>
</entry>
<entry>
<title>crypto: Use scatterwalk_crypto_chain</title>
<updated>2010-12-02T06:47:16Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2010-11-22T10:26:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c920fa6051c1e7eb3733eaefd01e5bcdddb3d4c8'/>
<id>urn:sha1:c920fa6051c1e7eb3733eaefd01e5bcdddb3d4c8</id>
<content type='text'>
Use scatterwalk_crypto_chain in favor of locally defined chaining functions.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: Use ERR_CAST</title>
<updated>2010-05-26T00:36:51Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2010-05-26T00:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8db050786aaf7a43f4c7a900a103f99ea0fb493f'/>
<id>urn:sha1:8db050786aaf7a43f4c7a900a103f99ea0fb493f</id>
<content type='text'>
Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)).  The former makes more
clear what is the purpose of the operation, which otherwise looks like a
no-op.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
type T;
T x;
identifier f;
@@

T f (...) { &lt;+...
- ERR_PTR(PTR_ERR(x))
+ x
 ...+&gt; }

@@
expression x;
@@

- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Fix cryptlen calculation</title>
<updated>2010-05-20T09:40:31Z</updated>
<author>
<name>Shikhar Khattar</name>
<email>shikhark@gmail.com</email>
</author>
<published>2010-05-20T09:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=921bae54693f26d01fb8e10ee6968b5cd8184551'/>
<id>urn:sha1:921bae54693f26d01fb8e10ee6968b5cd8184551</id>
<content type='text'>
This patch (applied against 2.6.34) fixes the calculation of the
length of the ABLKCIPHER decrypt request ("cryptlen") after an
asynchronous hash request has been completed in the AUTHENC interface.

Signed-off-by: Shikhar Khattar &lt;shikhark@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Add EINPROGRESS check</title>
<updated>2010-04-26T01:14:05Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2010-04-26T01:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=180ce7e81030e1ef763d58f97f9ab840ff57d848'/>
<id>urn:sha1:180ce7e81030e1ef763d58f97f9ab840ff57d848</id>
<content type='text'>
When Steffen originally wrote the authenc async hash patch, he
correctly had EINPROGRESS checks in place so that we did not invoke
the original completion handler with it.

Unfortuantely I told him to remove it before the patch was applied.

As only MAY_BACKLOG request completion handlers are required to
handle EINPROGRESS completions, those checks are really needed.

This patch restores them.

Reported-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Move saved IV in front of the ablkcipher request</title>
<updated>2010-03-03T14:41:08Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2010-03-03T14:41:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=50beceba7fdf5f10a04d8a053e62d40b742099ad'/>
<id>urn:sha1:50beceba7fdf5f10a04d8a053e62d40b742099ad</id>
<content type='text'>
In crypto_authenc_encrypt() we save the IV behind the ablkcipher
request. To save space on the request, we overwrite the ablkcipher
request with a ahash request after encryption. So the IV may be
overwritten by the ahash request. This patch fixes this by placing
the IV in front of the ablkcipher/ahash request.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Use correct ahash complete functions</title>
<updated>2010-03-02T13:59:54Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2010-03-02T13:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=77ba115c478d442024964b217f9f12192018cc77'/>
<id>urn:sha1:77ba115c478d442024964b217f9f12192018cc77</id>
<content type='text'>
We accidentally assigned the ahash update complete function to
the wrong function pointer in crypto_authenc_verify.
This patch fixes this.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: authenc - Fix checkpatch errors</title>
<updated>2010-02-16T12:27:20Z</updated>
<author>
<name>Richard Hartmann</name>
<email>richih.mailinglist@gmail.com</email>
</author>
<published>2010-02-16T12:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f3542e6d7b246e88b038e608358606ddd1f09870'/>
<id>urn:sha1:f3542e6d7b246e88b038e608358606ddd1f09870</id>
<content type='text'>
Signed-off-by: Richard Hartmann &lt;richih.mailinglist@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
