<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/crypto/xcbc.c, branch v3.16.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-10-31T23:31:11Z</updated>
<entry>
<title>crypto: add module.h to those files that are explicitly using it</title>
<updated>2011-10-31T23:31:11Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T18:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4bb33cc8901898af80d5d4a9917067aa0839922a'/>
<id>urn:sha1:4bb33cc8901898af80d5d4a9917067aa0839922a</id>
<content type='text'>
Part of the include cleanups means that the implicit
inclusion of module.h via device.h is going away.  So
fix things up in advance.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>crypto: xcbc - Fix alignment calculation of xcbc_tfm_ctx</title>
<updated>2009-08-20T07:58:04Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2009-08-20T07:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=36f87a4a29cb8cd291169483079fde34bad4ef16'/>
<id>urn:sha1:36f87a4a29cb8cd291169483079fde34bad4ef16</id>
<content type='text'>
The alignment calculation of xcbc_tfm_ctx uses alg-&gt;cra_alignmask
and not alg-&gt;cra_alignmask + 1 as it should. This led to frequent
crashes during the selftest of xcbc(aes-asm) on x86_64
machines. This patch fixes this. Also we use the alignmask
of xcbc and not the alignmask of the underlying algorithm
for the alignmnent calculation in xcbc_create now.

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: xcbc - Fix shash conversion</title>
<updated>2009-07-22T06:38:10Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-07-22T06:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac95301f271f32901e4007096aa3516def49eed2'/>
<id>urn:sha1:ac95301f271f32901e4007096aa3516def49eed2</id>
<content type='text'>
Although xcbc was converted to shash, it didn't obey the new
requirement that all hash state must be stored in the descriptor
rather than the transform.

This patch fixes this issue and also optimises away the rekeying
by precomputing K2 and K3 within setkey.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: xcbc - Use crypto_xor</title>
<updated>2009-07-22T06:38:10Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-07-22T05:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b588ef6e69bfc0944a17dc673ee166a00fa23de2'/>
<id>urn:sha1:b588ef6e69bfc0944a17dc673ee166a00fa23de2</id>
<content type='text'>
This patch replaces the local xor function with the generic
crypto_xor function.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: xcbc - Fix incorrect error value when creating instance</title>
<updated>2009-07-15T08:53:33Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-07-15T08:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b5ebd44eb7559ea6135d536bafd02323d2ef0547'/>
<id>urn:sha1:b5ebd44eb7559ea6135d536bafd02323d2ef0547</id>
<content type='text'>
If shash_alloc_instance() fails, we return the wrong error value.
This patch fixes it.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: xcbc - Switch to shash</title>
<updated>2009-07-14T04:58:06Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-07-12T04:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3106caab617c75c9a47706af3a8017318207be2d'/>
<id>urn:sha1:3106caab617c75c9a47706af3a8017318207be2d</id>
<content type='text'>
This patch converts the xcbc algorithm to the new shash type.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] xcbc: Fix crash when ipsec uses xcbc-mac with big data chunk</title>
<updated>2008-04-02T06:36:09Z</updated>
<author>
<name>Joy Latten</name>
<email>latten@austin.ibm.com</email>
</author>
<published>2008-04-02T06:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1edcf2e1ee2babb011cfca80ad9d202e9c491669'/>
<id>urn:sha1:1edcf2e1ee2babb011cfca80ad9d202e9c491669</id>
<content type='text'>
The kernel crashes when ipsec passes a udp packet of about 14XX bytes
of data to aes-xcbc-mac.

It seems the first xxxx bytes of the data are in first sg entry,
and remaining xx bytes are in next sg entry. But we don't 
check next sg entry to see if we need to go look the page up.

I noticed in hmac.c, we do a scatterwalk_sg_next(), to do this check
and possible lookup, thus xcbc.c needs to use this routine too.

A 15-hour run of an ipsec stress test sending streams of tcp and
udp packets of various sizes,  using this patch and 
aes-xcbc-mac completed successfully, so hopefully this fixes the
problem.
 
Signed-off-by: Joy Latten &lt;latten@austin.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] xcbc: Fix crash with IPsec</title>
<updated>2008-03-06T11:28:44Z</updated>
<author>
<name>Joy Latten</name>
<email>latten@austin.ibm.com</email>
</author>
<published>2008-03-06T11:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2f40a178e70030c4712fe63807c883f34c3645eb'/>
<id>urn:sha1:2f40a178e70030c4712fe63807c883f34c3645eb</id>
<content type='text'>
When using aes-xcbc-mac for authentication in IPsec, 
the kernel crashes. It seems this algorithm doesn't 
account for the space IPsec may make in scatterlist for authtag.
Thus when crypto_xcbc_digest_update2() gets called,
nbytes may be less than sg[i].length. 
Since nbytes is an unsigned number, it wraps
at the end of the loop allowing us to go back 
into loop and causing crash in memcpy.

I used update function in digest.c to model this fix.
Please let me know if it looks ok.

Signed-off-by: Joy Latten &lt;latten@austin.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p)</title>
<updated>2008-02-07T16:42:26Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-02-07T08:15:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e231c2ee64eb1c5cd3c63c31da9dac7d888dcf7f'/>
<id>urn:sha1:e231c2ee64eb1c5cd3c63c31da9dac7d888dcf7f</id>
<content type='text'>
Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using:

perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl 'ERR_PTR[(]*PTR_ERR' fs crypto net security`

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] xcbc: Remove bogus hash/cipher test</title>
<updated>2008-01-10T21:17:00Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2008-01-01T04:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94765b9e4cba8e3c51c292338db16aa174894d30'/>
<id>urn:sha1:94765b9e4cba8e3c51c292338db16aa174894d30</id>
<content type='text'>
When setting the digest size xcbc tests to see if the underlying algorithm
is a hash.  This is silly because we don't allow it to be a hash and we've
specifically requested for a cipher.

This patch removes the bogus test.

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