<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/crypto/skcipher.c, branch dev-4.10</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.10</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-12-14T10:33:14+00:00</updated>
<entry>
<title>crypto: skcipher - fix crash in virtual walk</title>
<updated>2016-12-14T10:33:14+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2016-12-13T13:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=18e615ad87bce9125ef3990377a4a946ec0f21f3'/>
<id>urn:sha1:18e615ad87bce9125ef3990377a4a946ec0f21f3</id>
<content type='text'>
The new skcipher walk API may crash in the following way. (Interestingly,
the tcrypt boot time tests seem unaffected, while an explicit test using
the module triggers it)

  Unable to handle kernel NULL pointer dereference at virtual address 00000000
  ...
  [&lt;ffff000008431d84&gt;] __memcpy+0x84/0x180
  [&lt;ffff0000083ec0d0&gt;] skcipher_walk_done+0x328/0x340
  [&lt;ffff0000080c5c04&gt;] ctr_encrypt+0x84/0x100
  [&lt;ffff000008406d60&gt;] simd_skcipher_encrypt+0x88/0x98
  [&lt;ffff0000083fa05c&gt;] crypto_rfc3686_crypt+0x8c/0x98
  [&lt;ffff0000009b0900&gt;] test_skcipher_speed+0x518/0x820 [tcrypt]
  [&lt;ffff0000009b31c0&gt;] do_test+0x1408/0x3b70 [tcrypt]
  [&lt;ffff0000009bd050&gt;] tcrypt_mod_init+0x50/0x1000 [tcrypt]
  [&lt;ffff0000080838f4&gt;] do_one_initcall+0x44/0x138
  [&lt;ffff0000081aee60&gt;] do_init_module+0x68/0x1e0
  [&lt;ffff0000081524d0&gt;] load_module+0x1fd0/0x2458
  [&lt;ffff000008152c38&gt;] SyS_finit_module+0xe0/0xf0
  [&lt;ffff0000080836f0&gt;] el0_svc_naked+0x24/0x28

This is due to the fact that skcipher_done_slow() may be entered with
walk-&gt;buffer unset. Since skcipher_walk_done() already deals with the
case where walk-&gt;buffer == walk-&gt;page, it appears to be the intention
that walk-&gt;buffer point to walk-&gt;page after skcipher_next_slow(), so
ensure that is the case.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add separate walker for AEAD decryption</title>
<updated>2016-12-01T13:06:17+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-11-30T13:14:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=34bc085c839cef85e3e795b1cee29514f69c3081'/>
<id>urn:sha1:34bc085c839cef85e3e795b1cee29514f69c3081</id>
<content type='text'>
The AEAD decrypt interface includes the authentication tag in
req-&gt;cryptlen.  Therefore we need to exlucde that when doing
a walk over it.

This patch adds separate walker functions for AEAD encryption
and decryption.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - fix crash in skcipher_walk_aead()</title>
<updated>2016-11-30T12:01:43+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2016-11-29T13:05:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3cbf61fb9fe24c0c3a1591b65175f8c5b3ddaac2'/>
<id>urn:sha1:3cbf61fb9fe24c0c3a1591b65175f8c5b3ddaac2</id>
<content type='text'>
The new skcipher_walk_aead() may crash in the following way due to
the walk flag SKCIPHER_WALK_PHYS not being cleared at the start of the
walk:

Unable to handle kernel NULL pointer dereference at virtual address 00000001
[..]
Internal error: Oops: 96000044 [#1] PREEMPT SMP
[..]
PC is at skcipher_walk_next+0x208/0x450
LR is at skcipher_walk_next+0x1e4/0x450
pc : [&lt;ffff2b93b7104e20&gt;] lr : [&lt;ffff2b93b7104dfc&gt;] pstate: 40000045
sp : ffffb925fa517940
[...]
[&lt;ffff2b93b7104e20&gt;] skcipher_walk_next+0x208/0x450
[&lt;ffff2b93b710535c&gt;] skcipher_walk_first+0x54/0x148
[&lt;ffff2b93b7105664&gt;] skcipher_walk_aead+0xd4/0x108
[&lt;ffff2b93b6e77928&gt;] ccm_encrypt+0x68/0x158

So clear the flag at the appropriate time.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add skcipher walk interface</title>
<updated>2016-11-28T13:23:17+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-11-22T12:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b286d8b1a690667e99a89d22245832b6898c6279'/>
<id>urn:sha1:b286d8b1a690667e99a89d22245832b6898c6279</id>
<content type='text'>
This patch adds the skcipher walk interface which replaces both
blkcipher walk and ablkcipher walk.  Just like blkcipher walk it
can also be used for AEAD algorithms.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Remove top-level givcipher interface</title>
<updated>2016-07-18T09:35:46+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-07-12T05:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3a01d0ee2b991c8c267620e63a4ab47cd8c30cc4'/>
<id>urn:sha1:3a01d0ee2b991c8c267620e63a4ab47cd8c30cc4</id>
<content type='text'>
This patch removes the old crypto_grab_skcipher helper and replaces
it with crypto_grab_skcipher2.

As this is the final entry point into givcipher this patch also
removes all traces of the top-level givcipher interface, including
all implicit IV generators such as chainiv.

The bottom-level givcipher interface remains until the drivers
using it are converted.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add low-level skcipher interface</title>
<updated>2016-07-18T09:35:36+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-07-12T05:17:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4e6c3df4d729f85997cbf276bfa8ffd8579b8e77'/>
<id>urn:sha1:4e6c3df4d729f85997cbf276bfa8ffd8579b8e77</id>
<content type='text'>
This patch allows skcipher algorithms and instances to be created
and registered with the crypto API.  They are accessible through
the top-level skcipher interface, along with ablkcipher/blkcipher
algorithms and instances.

This patch also introduces a new parameter called chunk size
which is meant for ciphers such as CTR and CTS which ostensibly
can handle arbitrary lengths, but still behave like block ciphers
in that you can only process a partial block at the very end.

For these ciphers the block size will continue to be set to 1
as it is now while the chunk size will be set to the underlying
block size.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add default key size helper</title>
<updated>2016-01-25T14:42:11+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-01-21T09:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=973fb3fb50e3959d90179d09ed3ce454dd7bc6e4'/>
<id>urn:sha1:973fb3fb50e3959d90179d09ed3ce454dd7bc6e4</id>
<content type='text'>
While converting ecryptfs over to skcipher I found that it needs
to pick a default key size if one isn't given.  Rather than having
it poke into the guts of the algorithm to get max_keysize, let's
provide a helper that is meant to give a sane default (just in
case we ever get an algorithm that has no maximum key size).

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add crypto_skcipher_has_setkey</title>
<updated>2016-01-18T10:16:12+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-01-11T13:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a1383cd86a062fc798899ab20f0ec2116cce39cb'/>
<id>urn:sha1:a1383cd86a062fc798899ab20f0ec2116cce39cb</id>
<content type='text'>
This patch adds a way for skcipher users to determine whether a key
is required by a transform.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - blkcipher and ablkcipher should it be static</title>
<updated>2015-10-01T13:56:57+00:00</updated>
<author>
<name>Geliang Tang</name>
<email>geliangtang@163.com</email>
</author>
<published>2015-09-27T14:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=ecdd6bed292fda02a3e3997307ac228edcab0b22'/>
<id>urn:sha1:ecdd6bed292fda02a3e3997307ac228edcab0b22</id>
<content type='text'>
Fixes the following sparse warnings:

 crypto/skcipher.c:94:5:
 warning: symbol 'crypto_init_skcipher_ops_blkcipher'
 was not declared. Should it be static?

 crypto/skcipher.c:185:5:
 warning: symbol 'crypto_init_skcipher_ops_ablkcipher'
 was not declared. Should it be static?

Signed-off-by: Geliang Tang &lt;geliangtang@163.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add top-level skcipher interface</title>
<updated>2015-08-21T14:21:19+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-08-20T07:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7a7ffe65c8c5fbf272b132d8980b2511d5e5fc98'/>
<id>urn:sha1:7a7ffe65c8c5fbf272b132d8980b2511d5e5fc98</id>
<content type='text'>
This patch introduces the crypto skcipher interface which aims
to replace both blkcipher and ablkcipher.

It's very similar to the existing ablkcipher interface.  The
main difference is the removal of the givcrypt interface.  In
order to make the transition easier for blkcipher users, there
is a helper SKCIPHER_REQUEST_ON_STACK which can be used to place
a request on the stack for synchronous transforms.

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