<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/crypto, branch v3.15</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/crypto?h=v3.15</id>
<link rel='self' href='https://git.amat.us/linux/atom/crypto?h=v3.15'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-04-24T17:44:54Z</updated>
<entry>
<title>net: Use netlink_ns_capable to verify the permisions of netlink messages</title>
<updated>2014-04-24T17:44:54Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2014-04-23T21:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90f62cf30a78721641e08737bda787552428061e'/>
<id>urn:sha1:90f62cf30a78721641e08737bda787552428061e</id>
<content type='text'>
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.

To keep this from happening replace bare capable and ns_capable calls
with netlink_capable, netlink_net_calls and netlink_ns_capable calls.
Which act the same as the previous calls except they verify that the
opener of the socket had the desired permissions as well.

Reported-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>crypto: sha - SHA1 transform x86_64 AVX2</title>
<updated>2014-03-21T13:54:30Z</updated>
<author>
<name>chandramouli narayanan</name>
<email>mouli@linux.intel.com</email>
</author>
<published>2014-03-20T22:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c1da8d0d046174a4188b5729d7579abf3d29427'/>
<id>urn:sha1:7c1da8d0d046174a4188b5729d7579abf3d29427</id>
<content type='text'>
This git patch adds x86_64 AVX2 optimization of SHA1
transform to crypto support. The patch has been tested with 3.14.0-rc1
kernel.

On a Haswell desktop, with turbo disabled and all cpus running
at maximum frequency, tcrypt shows AVX2 performance improvement
from 3% for 256 bytes update to 16% for 1024 bytes update over
AVX implementation.

This patch adds sha1_avx2_transform(), the glue, build and
configuration changes needed for AVX2 optimization of
SHA1 transform to crypto support.

sha1-ssse3 is one module which adds the necessary optimization
support (SSSE3/AVX/AVX2) for the low-level SHA1 transform function.
With better optimization support, transform function is overridden
as the case may be. In the case of AVX2, due to performance reasons
across datablock sizes, the AVX or AVX2 transform function is used
at run-time as it suits best. The Makefile change therefore appends
the necessary objects to the linkage. Due to this, the patch merely
appends AVX2 transform to the existing build mix and Kconfig support
and leaves the configuration build support as is.

Signed-off-by: Chandramouli Narayanan &lt;mouli@linux.intel.com&gt;
Reviewed-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: crypto_wq - Fix late crypto work queue initialization</title>
<updated>2014-03-21T13:54:28Z</updated>
<author>
<name>Tim Chen</name>
<email>tim.c.chen@linux.intel.com</email>
</author>
<published>2014-03-17T23:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=130fa5bc81b44b6cc1fbdea3abf6db0da22964e0'/>
<id>urn:sha1:130fa5bc81b44b6cc1fbdea3abf6db0da22964e0</id>
<content type='text'>
The crypto algorithm modules utilizing the crypto daemon could
be used early when the system start up.  Using module_init
does not guarantee that the daemon's work queue is initialized
when the cypto alorithm depending on crypto_wq starts.  It is necessary
to initialize the crypto work queue earlier at the subsystem
init time to make sure that it is initialized
when used.

Signed-off-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: testmgr - add aead null encryption test vectors</title>
<updated>2014-03-21T13:54:27Z</updated>
<author>
<name>Horia Geanta</name>
<email>horia.geanta@freescale.com</email>
</author>
<published>2014-03-14T15:46:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bca4feb0d4fe2d5da1a0f31ef89f63709aba4906'/>
<id>urn:sha1:bca4feb0d4fe2d5da1a0f31ef89f63709aba4906</id>
<content type='text'>
Add test vectors for aead with null encryption and md5,
respectively sha1 authentication.
Input data is taken from test vectors listed in RFC2410.

Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: export NULL algorithms defines</title>
<updated>2014-03-21T13:54:26Z</updated>
<author>
<name>Horia Geanta</name>
<email>horia.geanta@freescale.com</email>
</author>
<published>2014-03-14T15:46:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72567258f0643eda5d622be16e35fb933aa6146e'/>
<id>urn:sha1:72567258f0643eda5d622be16e35fb933aa6146e</id>
<content type='text'>
These defines might be needed by crypto drivers.

Signed-off-by: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Simplify the ahash_finup implementation</title>
<updated>2014-03-21T13:54:22Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2014-03-14T01:37:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4a7a0fbe959e12bdd071b79b50ed34853a6db8f'/>
<id>urn:sha1:d4a7a0fbe959e12bdd071b79b50ed34853a6db8f</id>
<content type='text'>
The ahash_def_finup() can make use of the request save/restore functions,
thus make it so. This simplifies the code a little and unifies the code
paths.

Note that the same remark about free()ing the req-&gt;priv applies here, the
req-&gt;priv can only be free()'d after the original request was restored.

Finally, squash a bug in the invocation of completion in the ASYNC path.
In both ahash_def_finup_done{1,2}, the function areq-&gt;base.complete(X, err);
was called with X=areq-&gt;base.data . This is incorrect , as X=&amp;areq-&gt;base
is the correct value. By analysis of the data structures, we see the areq is
of type 'struct ahash_request' , areq-&gt;base is of type 'struct crypto_async_request'
and areq-&gt;base.completion is of type crypto_completion_t, which is defined in
include/linux/crypto.h as:

  typedef void (*crypto_completion_t)(struct crypto_async_request *req, int err);

This is one lead that the X should be &amp;areq-&gt;base . Next up, we can inspect
other code which calls the completion callback to give us kind-of statistical
idea of how this callback is used. We can try:

  $ git grep base\.complete\( drivers/crypto/

Finally, by inspecting ahash_request_set_callback() implementation defined
in include/crypto/hash.h , we observe that the .data entry of 'struct
crypto_async_request' is intended for arbitrary data, not for completion
argument.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Pull out the functions to save/restore request</title>
<updated>2014-03-21T13:54:21Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2014-03-14T01:37:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1ffc9fbd1e5071948b6d48f9a27d845738ee890f'/>
<id>urn:sha1:1ffc9fbd1e5071948b6d48f9a27d845738ee890f</id>
<content type='text'>
The functions to save original request within a newly adjusted request
and it's counterpart to restore the original request can be re-used by
more code in the crypto/ahash.c file. Pull these functions out from the
code so they're available.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Fix the pointer voodoo in unaligned ahash</title>
<updated>2014-03-21T13:54:20Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2014-03-14T01:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ab6bf4e5e5e4298e8649e635bee25542cccbfd97'/>
<id>urn:sha1:ab6bf4e5e5e4298e8649e635bee25542cccbfd97</id>
<content type='text'>
Add documentation for the pointer voodoo that is happening in crypto/ahash.c
in ahash_op_unaligned(). This code is quite confusing, so add a beefy chunk
of documentation.

Moreover, make sure the mangled request is completely restored after finishing
this unaligned operation. This means restoring all of .result, .base.data
and .base.complete .

Also, remove the crypto_completion_t complete = ... line present in the
ahash_op_unaligned_done() function. This type actually declares a function
pointer, which is very confusing.

Finally, yet very important nonetheless, make sure the req-&gt;priv is free()'d
only after the original request is restored in ahash_op_unaligned_done().
The req-&gt;priv data must not be free()'d before that in ahash_op_unaligned_finish(),
since we would be accessing previously free()'d data in ahash_op_unaligned_done()
and cause corruption.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: allow blkcipher walks over AEAD data</title>
<updated>2014-03-10T12:17:11Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2014-03-04T05:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f7f1d7cff8f2c170ce0319eb4c01a82c328d34f'/>
<id>urn:sha1:4f7f1d7cff8f2c170ce0319eb4c01a82c328d34f</id>
<content type='text'>
This adds the function blkcipher_aead_walk_virt_block, which allows the caller
to use the blkcipher walk API to handle the input and output scatterlists.

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: remove direct blkcipher_walk dependency on transform</title>
<updated>2014-03-10T12:17:10Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2014-03-04T05:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=822be00fe67105a90e536df52d1e4d688f34b5b2'/>
<id>urn:sha1:822be00fe67105a90e536df52d1e4d688f34b5b2</id>
<content type='text'>
In order to allow other uses of the blkcipher walk API than the blkcipher
algos themselves, this patch copies some of the transform data members to the
walk struct so the transform is only accessed at walk init 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>
</feed>
