<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/crypto/fcrypt.c, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-12-02T10:12:40+00:00</updated>
<entry>
<title>crypto: Prepare to move crypto_tfm_ctx</title>
<updated>2022-12-02T10:12:40+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2022-11-25T04:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14386d471322a204344ae81a28738b71e261d3a0'/>
<id>urn:sha1:14386d471322a204344ae81a28738b71e261d3a0</id>
<content type='text'>
The helper crypto_tfm_ctx is only used by the Crypto API algorithm
code and should really be in algapi.h.  However, for historical
reasons many files relied on it to be in crypto.h.  This patch
changes those files to use algapi.h instead in prepartion for a
move.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: fcrypt - Remove 'do while(0)' loop for single statement macro</title>
<updated>2021-04-02T07:28:13+00:00</updated>
<author>
<name>Milan Djurovic</name>
<email>mdjurovic@zohomail.com</email>
</author>
<published>2021-03-26T18:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c083eb3e9ca32c0ef257246dc979c8853ffcdb1'/>
<id>urn:sha1:5c083eb3e9ca32c0ef257246dc979c8853ffcdb1</id>
<content type='text'>
Remove the 'do while(0)' loop in the macro, as it is not needed for single
statement macros. Condense into one line.

Signed-off-by: Milan Djurovic &lt;mdjurovic@zohomail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: fcrypt - drop unneeded alignmask</title>
<updated>2021-02-10T06:55:56+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2021-02-01T18:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9cbaef5111a403b1e40ddec2bfb9adea2da682f'/>
<id>urn:sha1:e9cbaef5111a403b1e40ddec2bfb9adea2da682f</id>
<content type='text'>
The fcrypt implementation uses memcpy() to access the input and output
buffers so there is no need to set an alignmask.

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: 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: 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: fcrypt - Fix bitoperation for compilation with clang</title>
<updated>2013-09-02T10:32:58+00:00</updated>
<author>
<name>Jan-Simon Möller</name>
<email>dl9pf@gmx.de</email>
</author>
<published>2013-08-29T18:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06e710bd5faa886e9b5d032d375761de28fcef54'/>
<id>urn:sha1:06e710bd5faa886e9b5d032d375761de28fcef54</id>
<content type='text'>
v2: Fix bug in statement as pointed out by Herbert Xu. Kudos to pipacs.

Author:  PaX Team &lt;pageexec at freemail.hu&gt;
ML-Post: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120507/142707.html
URL:     http://llvm.linuxfoundation.org

Merge:   Jan-Simon Möller &lt;dl9pf at gmx.de&gt;

Description:

Fix for warning:
linux/crypto/fcrypt.c:143:47: warning: signed shift result (0x598000000) requires 36 bits to
      represent, but 'int' only has 32 bits [-Wshift-overflow]
        Z(0xef), Z(0x70), Z(0xcf), Z(0xc2), Z(0x2a), Z(0xb3), Z(0x61), Z(0xad),
                                                     ^~~~~~~
linux/crypto/fcrypt.c:113:29: note: expanded from macro 'Z'
                            ^  ~~
linux/include/uapi/linux/byteorder/little_endian.h:38:53: note: expanded from macro
      '__cpu_to_be32'
                                                    ^
linux/include/uapi/linux/swab.h:116:21: note: expanded from macro '__swab32'
        ___constant_swab32(x) :                 \
                           ^
linux/include/uapi/linux/swab.h:18:12: note: expanded from macro '___constant_swab32'
        (((__u32)(x) &amp; (__u32)0x0000ff00UL) &lt;&lt;  8) |            \
                  ^

Solution - make sure we don't exceed the 32 bit range.
 #define Z(x) cpu_to_be32(((x &amp; 0x1f) &lt;&lt; 27) | (x &gt;&gt; 5))

Signed-off-by: Jan-Simon Möller &lt;dl9pf@gmx.de&gt;
CC: pageexec@freemail.hu
CC: llvmlinux@lists.linuxfoundation.org
CC: behanw@converseincode.com
CC: herbert@gondor.apana.org.au
CC: davem@davemloft.net
CC: linux-crypto@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cleanup - remove unneeded crypto_alg.cra_list initializations</title>
<updated>2012-08-01T09:47:27+00:00</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@mbnet.fi</email>
</author>
<published>2012-07-11T11:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77ec2e734d4820c51cbabe1257e9311df5868160'/>
<id>urn:sha1:77ec2e734d4820c51cbabe1257e9311df5868160</id>
<content type='text'>
Initialization of cra_list is currently mixed, most ciphers initialize this
field and most shashes do not. Initialization however is not needed at all
since cra_list is initialized/overwritten in __crypto_register_alg() with
list_add(). Therefore perform cleanup to remove all unneeded initializations
of this field in 'crypto/'.

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: fcrypt - Fix checkpatch errors</title>
<updated>2010-02-16T12:34:07+00:00</updated>
<author>
<name>Richard Hartmann</name>
<email>richih.mailinglist@gmail.com</email>
</author>
<published>2010-02-16T12:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0047e81dc366a0690b4765250c3a1d8caf3797c4'/>
<id>urn:sha1:0047e81dc366a0690b4765250c3a1d8caf3797c4</id>
<content type='text'>
Signed-off-by: Richard Hartmann &lt;richih.mailinglist@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: remove uses of __constant_{endian} helpers</title>
<updated>2008-12-25T00:02:03+00:00</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-11-28T12:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dad3df2044b78ba68a92bf78e38a408bab80ff61'/>
<id>urn:sha1:dad3df2044b78ba68a92bf78e38a408bab80ff61</id>
<content type='text'>
Base versions handle constant folding just fine.

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