<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/crypto, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-14T14:59:34Z</updated>
<entry>
<title>crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit</title>
<updated>2021-07-14T14:59:34Z</updated>
<author>
<name>Hangbin Liu</name>
</author>
<published>2021-06-03T05:53:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=828575bc1b9592556c0d0f49f443f350276a501f'/>
<id>urn:sha1:828575bc1b9592556c0d0f49f443f350276a501f</id>
<content type='text'>
[ Upstream commit 1b82435d17774f3eaab35dce239d354548aa9da2 ]

In curve25519_mod_init() the curve25519_alg will be registered only when
(X86_FEATURE_BMI2 &amp;&amp; X86_FEATURE_ADX). But in curve25519_mod_exit()
it still checks (X86_FEATURE_BMI2 || X86_FEATURE_ADX) when do crypto
unregister. This will trigger a BUG_ON in crypto_unregister_alg() as
alg-&gt;cra_refcnt is 0 if the cpu only supports one of X86_FEATURE_BMI2
and X86_FEATURE_ADX.

Fixes: 07b586fe0662 ("crypto: x86/curve25519 - replace with formally verified implementation")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reviewed-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: poly1305 - fix poly1305_core_setkey() declaration</title>
<updated>2021-05-14T08:52:24Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2021-03-22T17:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a542f220b4b1b02a5d36dec45e5fc9072b8577cc'/>
<id>urn:sha1:a542f220b4b1b02a5d36dec45e5fc9072b8577cc</id>
<content type='text'>
[ Upstream commit 8d195e7a8ada68928f2aedb2c18302a4518fe68e ]

gcc-11 points out a mismatch between the declaration and the definition
of poly1305_core_setkey():

lib/crypto/poly1305-donna32.c:13:67: error: argument 2 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Werror=array-parameter=]
   13 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 raw_key[16])
      |                                                          ~~~~~~~~~^~~~~~~~~~~
In file included from lib/crypto/poly1305-donna32.c:11:
include/crypto/internal/poly1305.h:21:68: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’}
   21 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 *raw_key);

This is harmless in principle, as the calling conventions are the same,
but the more specific prototype allows better type checking in the
caller.

Change the declaration to match the actual function definition.
The poly1305_simd_init() is a bit suspicious here, as it previously
had a 32-byte argument type, but looks like it needs to take the
16-byte POLY1305_BLOCK_SIZE array instead.

Fixes: 1c08a104360f ("crypto: poly1305 - add new 32 and 64-bit generic versions")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: aesni - release FPU during skcipher walk API calls</title>
<updated>2021-01-22T03:58:04Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-16T16:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65d1e3c415f6e380f6168faf333a59ec235eac5d'/>
<id>urn:sha1:65d1e3c415f6e380f6168faf333a59ec235eac5d</id>
<content type='text'>
Taking ownership of the FPU in kernel mode disables preemption, and
this may result in excessive scheduling blackouts if the size of the
data being processed on the FPU is unbounded.

Given that taking and releasing the FPU is cheap these days on x86, we
can limit the impact of this issue easily for skcipher implementations,
by moving the FPU begin/end calls inside the skcipher walk processing
loop. Considering that skcipher walks operate on at most one page at a
time, doing so fully mitigates this issue.

This also permits the skcipher walk logic to use non-atomic kmalloc()
calls etc so we can change the 'atomic' bool argument in the calls to
skcipher_walk_virt() to false as well.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: aesni - replace CTR function pointer with static call</title>
<updated>2021-01-22T03:58:04Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-16T16:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64a49b85953cafeaba2b4c2c13d089b3ed41cca6'/>
<id>urn:sha1:64a49b85953cafeaba2b4c2c13d089b3ed41cca6</id>
<content type='text'>
Indirect calls are very expensive on x86, so use a static call to set
the system-wide AES-NI/CTR asm helper.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86 - use local headers for x86 specific shared declarations</title>
<updated>2021-01-14T06:10:30Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a04ea6f7ffa27d5825b56cb1591ad0992910992c'/>
<id>urn:sha1:a04ea6f7ffa27d5825b56cb1591ad0992910992c</id>
<content type='text'>
The Camellia, Serpent and Twofish related header files only contain
declarations that are shared between different implementations of the
respective algorithms residing under arch/x86/crypto, and none of their
contents should be used elsewhere. So move the header files into the
same location, and use local #includes instead.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86 - remove glue helper module</title>
<updated>2021-01-14T06:10:29Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64ca771cd6bf48bd01f630ad1440ab151d1d19d5'/>
<id>urn:sha1:64ca771cd6bf48bd01f630ad1440ab151d1d19d5</id>
<content type='text'>
All dependencies on the x86 glue helper module have been replaced by
local instantiations of the new ECB/CBC preprocessor helper macros, so
the glue helper module can be retired.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86/twofish - drop dependency on glue helper</title>
<updated>2021-01-14T06:10:29Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=165f357334cc92435aa9b5c9161567e0d0ab8f2a'/>
<id>urn:sha1:165f357334cc92435aa9b5c9161567e0d0ab8f2a</id>
<content type='text'>
Replace the glue helper dependency with implementations of ECB and CBC
based on the new CPP macros, which avoid the need for indirect calls.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86/cast6 - drop dependency on glue helper</title>
<updated>2021-01-14T06:10:29Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea55cfc3f920c95ee8d01ddc51e586b09a1194ee'/>
<id>urn:sha1:ea55cfc3f920c95ee8d01ddc51e586b09a1194ee</id>
<content type='text'>
Replace the glue helper dependency with implementations of ECB and CBC
based on the new CPP macros, which avoid the need for indirect calls.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86/cast5 - drop dependency on glue helper</title>
<updated>2021-01-14T06:10:29Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=674d40abac42d502e226da6045fad61d7206e5fb'/>
<id>urn:sha1:674d40abac42d502e226da6045fad61d7206e5fb</id>
<content type='text'>
Replace the glue helper dependency with implementations of ECB and CBC
based on the new CPP macros, which avoid the need for indirect calls.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86/serpent - drop dependency on glue helper</title>
<updated>2021-01-14T06:10:29Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-01-05T16:48:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ad58b46f814edd5b8b288b66f94cf57c97eaea3'/>
<id>urn:sha1:9ad58b46f814edd5b8b288b66f94cf57c97eaea3</id>
<content type='text'>
Replace the glue helper dependency with implementations of ECB and CBC
based on the new CPP macros, which avoid the need for indirect calls.

Acked-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
