<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/crypto/md4.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-06-13T06:31:39+00:00</updated>
<entry>
<title>crypto: make all generic algorithms set cra_driver_name</title>
<updated>2019-06-13T06:31:39+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-06-03T05:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634'/>
<id>urn:sha1:d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634</id>
<content type='text'>
Most generic crypto algorithms declare a driver name ending in
"-generic".  The rest don't declare a driver name and instead rely on
the crypto API automagically appending "-generic" upon registration.

Having multiple conventions is unnecessarily confusing and makes it
harder to grep for all generic algorithms in the kernel source tree.
But also, allowing NULL driver names is problematic because sometimes
people fail to set it, e.g. the case fixed by commit 417980364300
("crypto: cavium/zip - fix collision with generic cra_driver_name").

Of course, people can also incorrectly name their drivers "-generic".
But that's much easier to notice / grep for.

Therefore, let's make cra_driver_name mandatory.  In preparation for
this, this patch makes all generic algorithms set cra_driver_name.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: run initcalls for generic implementations earlier</title>
<updated>2019-04-18T14:15:03+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-04-12T04:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4741b23059794bd99beef0f700103b0d983b3fd'/>
<id>urn:sha1:c4741b23059794bd99beef0f700103b0d983b3fd</id>
<content type='text'>
Use subsys_initcall for registration of all templates and generic
algorithm implementations, rather than module_init.  Then change
cryptomgr to use arch_initcall, to place it before the subsys_initcalls.

This is needed so that when both a generic and optimized implementation
of an algorithm are built into the kernel (not loadable modules), the
generic implementation is registered before the optimized one.
Otherwise, the self-tests for the optimized implementation are unable to
allocate the generic implementation for the new comparison fuzz tests.

Note that on arm, a side effect of this change is that self-tests for
generic implementations may run before the unaligned access handler has
been installed.  So, unaligned accesses will crash the kernel.  This is
arguably a good thing as it makes it easier to detect that type of bug.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: shash - remove useless setting of type flags</title>
<updated>2018-07-08T16:30:24+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2018-06-30T22:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e50944e219f908968a6e01fbd0e8811a33bd5f04'/>
<id>urn:sha1:e50944e219f908968a6e01fbd0e8811a33bd5f04</id>
<content type='text'>
Many shash algorithms set .cra_flags = CRYPTO_ALG_TYPE_SHASH.  But this
is redundant with the C structure type ('struct shash_alg'), and
crypto_register_shash() already sets the type flag automatically,
clearing any type flag that was already there.  Apparently the useless
assignment has just been copy+pasted around.

So, remove the useless assignment from all the shash algorithms.

This patch shouldn't change any actual behavior.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array()</title>
<updated>2018-03-30T17:33:09+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2018-03-21T17:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9def051018c08e65c532822749e857eb4b2e12e7'/>
<id>urn:sha1:9def051018c08e65c532822749e857eb4b2e12e7</id>
<content type='text'>
Deduplicate le32_to_cpu_array() and cpu_to_le32_array() by moving them
to the generic header.

No functional change implied.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: prefix module autoloading with "crypto-"</title>
<updated>2014-11-24T14:43:57+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2014-11-21T01:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d26a105b5a73e5635eae0629b42fa0a90e07b7b'/>
<id>urn:sha1:5d26a105b5a73e5635eae0629b42fa0a90e07b7b</id>
<content type='text'>
This prefixes all crypto module loading with "crypto-" so we never run
the risk of exposing module auto-loading to userspace via a crypto API,
as demonstrated by Mathias Krause:

https://lkml.org/lkml/2013/3/4/70

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: add module.h to those files that are explicitly using it</title>
<updated>2011-10-31T23:31:11+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T18:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/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: md4 - Switch to shash</title>
<updated>2008-12-25T00:02:16+00:00</updated>
<author>
<name>Adrian-Ken Rueegsegger</name>
<email>ken@codelabs.ch</email>
</author>
<published>2008-12-03T11:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=808a1763cef93bf0f740d7e10dd9a2dfc4065b1a'/>
<id>urn:sha1:808a1763cef93bf0f740d7e10dd9a2dfc4065b1a</id>
<content type='text'>
This patch changes md4 to the new shash interface.

Signed-off-by: Adrian-Ken Rueegsegger &lt;ken@codelabs.ch&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: md4 - Use ARRAY_SIZE</title>
<updated>2008-12-25T00:01:45+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2008-11-13T13:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31a61bfc6e415fbd871317cbee7b8a4158d8ac5b'/>
<id>urn:sha1:31a61bfc6e415fbd871317cbee7b8a4158d8ac5b</id>
<content type='text'>
ARRAY_SIZE is more concise to use when the size of an array is divided by
the size of its type or the size of its first element.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@i@
@@

#include &lt;linux/kernel.h&gt;

@depends on i using "paren.iso"@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
// &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] all: Clean up init()/fini()</title>
<updated>2008-04-21T02:19:34+00:00</updated>
<author>
<name>Kamalesh Babulal</name>
<email>kamalesh@linux.vnet.ibm.com</email>
</author>
<published>2008-04-05T13:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3af5b90bde5000abc739996cb03fd718e753d053'/>
<id>urn:sha1:3af5b90bde5000abc739996cb03fd718e753d053</id>
<content type='text'>
On Thu, Mar 27, 2008 at 03:40:36PM +0100, Bodo Eggert wrote:
&gt; Kamalesh Babulal &lt;kamalesh@linux.vnet.ibm.com&gt; wrote:
&gt; 
&gt; &gt; This patch cleanups the crypto code, replaces the init() and fini()
&gt; &gt; with the &lt;algorithm name&gt;_init/_fini
&gt; 
&gt; This part ist OK.
&gt; 
&gt; &gt; or init/fini_&lt;algorithm name&gt; (if the 
&gt; &gt; &lt;algorithm name&gt;_init/_fini exist)
&gt; 
&gt; Having init_foo and foo_init won't be a good thing, will it? I'd start
&gt; confusing them.
&gt; 
&gt; What about foo_modinit instead?

Thanks for the suggestion, the init() is replaced with

	&lt;algorithm name&gt;_mod_init ()

and fini () is replaced with &lt;algorithm name&gt;_mod_fini.
 
Signed-off-by: Kamalesh Babulal &lt;kamalesh@linux.vnet.ibm.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] all: Pass tfm instead of ctx to algorithms</title>
<updated>2006-06-26T07:34:39+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2006-05-16T12:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c2bb98bc33ae33c7a33a133a4cd5a06395fece5'/>
<id>urn:sha1:6c2bb98bc33ae33c7a33a133a4cd5a06395fece5</id>
<content type='text'>
Up until now algorithms have been happy to get a context pointer since
they know everything that's in the tfm already (e.g., alignment, block
size).

However, once we have parameterised algorithms, such information will
be specific to each tfm.  So the algorithm API needs to be changed to
pass the tfm structure instead of the context pointer.

This patch is basically a text substitution.  The only tricky bit is
the assembly routines that need to get the context pointer offset
through asm-offsets.h.

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