kernel_optimize_test/crypto
Jason A. Donenfeld d721986e96 crypto: memneq - move into lib/
commit abfed87e2a12bd246047d78c01d81eb9529f1d06 upstream.

This is used by code that doesn't need CONFIG_CRYPTO, so move this into
lib/ with a Kconfig option so that it can be selected by whatever needs
it.

This fixes a linker error Zheng pointed out when
CRYPTO_MANAGER_DISABLE_TESTS!=y and CRYPTO=m:

  lib/crypto/curve25519-selftest.o: In function `curve25519_selftest':
  curve25519-selftest.c:(.init.text+0x60): undefined reference to `__crypto_memneq'
  curve25519-selftest.c:(.init.text+0xec): undefined reference to `__crypto_memneq'
  curve25519-selftest.c:(.init.text+0x114): undefined reference to `__crypto_memneq'
  curve25519-selftest.c:(.init.text+0x154): undefined reference to `__crypto_memneq'

Reported-by: Zheng Bin <zhengbin13@huawei.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: stable@vger.kernel.org
Fixes: aa127963f1 ("crypto: lib/curve25519 - re-add selftests")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-22 14:13:18 +02:00
..
asymmetric_keys X.509: Fix crash caused by NULL pointer 2021-01-23 16:03:58 +01:00
async_tx async_xor: check src_offs is not NULL before updating it 2021-06-16 12:01:40 +02:00
842.c
acompress.c crypto: api - permit users to specify numa node of acomp hardware 2020-07-09 18:25:23 +10:00
adiantum.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
aead.c crypto: algapi - enforce that all instances have a ->free() method 2020-01-09 11:30:58 +08:00
aegis.h
aegis128-core.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
aegis128-neon-inner.c crypto: aegis128 - duplicate init() and final() hooks in SIMD code 2019-10-26 02:06:05 +11:00
aegis128-neon.c crypto: aegis128 - duplicate init() and final() hooks in SIMD code 2019-10-26 02:06:05 +11:00
aes_generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
aes_ti.c
af_alg.c crypto: af_alg - avoid undefined behavior accessing salg_name 2020-12-26 16:02:45 +01:00
ahash.c crypto: ahash - Add init_tfm/exit_tfm 2020-08-28 16:58:28 +10:00
akcipher.c crypto: algapi - enforce that all instances have a ->free() method 2020-01-09 11:30:58 +08:00
algapi.c crypto: api - Move cryptomgr soft dependency into algapi 2022-02-11 09:09:03 +01:00
algboss.c crypto: algboss - don't wait during notifier callback 2020-06-15 17:38:54 +10:00
algif_aead.c crypto: algif_aead - Do not set MAY_BACKLOG on the async path 2020-08-21 14:45:27 +10:00
algif_hash.c net: make ->{get,set}sockopt in proto_ops optional 2020-07-19 18:16:41 -07:00
algif_rng.c crypto: af_alg - add extra parameters for DRBG interface 2020-09-25 17:48:52 +10:00
algif_skcipher.c crypto: algif_skcipher - EBUSY on aio should be an error 2020-08-21 14:45:26 +10:00
ansi_cprng.c
anubis.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
api.c crypto: api - Move cryptomgr soft dependency into algapi 2022-02-11 09:09:03 +01:00
arc4.c crypto: arc4 - mark ecb(arc4) skcipher as obsolete 2020-09-11 14:39:16 +10:00
authenc.c crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-08 14:39:59 +02:00
authencesn.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
blake2b_generic.c crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
blake2s_generic.c lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI 2022-05-30 09:33:26 +02:00
blowfish_common.c
blowfish_generic.c
camellia_generic.c crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
cast_common.c
cast5_generic.c
cast6_generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
cbc.c crypto: cbc - Remove cbc.h 2020-09-11 14:39:16 +10:00
ccm.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
cfb.c crypto: skcipher - Add skcipher_ialg_simple helper 2019-12-27 18:18:04 +08:00
chacha_generic.c crypto: chacha_generic - remove unnecessary setkey() functions 2019-11-22 18:48:39 +08:00
chacha20poly1305.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
cipher.c crypto: remove propagation of CRYPTO_TFM_RES_* flags 2020-01-09 11:30:53 +08:00
cmac.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
compress.c crypto: compress - remove crt_u.compress (struct compress_tfm) 2019-12-11 16:37:01 +08:00
crc32_generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
crc32c_generic.c crypto: crc32c_generic - delete and fix duplicated words 2020-08-21 14:45:25 +10:00
crct10dif_common.c
crct10dif_generic.c crypto: crct10dif_generic - fix duplicated words 2020-08-21 14:45:25 +10:00
cryptd.c crypto: cryptd - Protect per-CPU resource by disabling BH. 2022-06-09 10:21:17 +02:00
crypto_engine.c crypto: engine - delete duplicated word 2020-08-21 14:45:26 +10:00
crypto_null.c
crypto_user_base.c crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
crypto_user_stat.c crypto: skcipher - remove the "blkcipher" algorithm type 2019-11-01 13:38:32 +08:00
ctr.c crypto: algapi - add NEED_FALLBACK to INHERITED_FLAGS 2020-07-16 21:49:08 +10:00
cts.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
curve25519-generic.c crypto: curve25519 - implement generic KPP driver 2019-11-17 09:02:43 +08:00
deflate.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
des_generic.c crypto: remove CRYPTO_TFM_RES_WEAK_KEY 2020-01-09 11:30:53 +08:00
dh_helper.c
dh.c crypto: dh - SP800-56A rev 3 local public key validation 2020-07-31 18:08:59 +10:00
drbg.c crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-06 08:42:42 +02:00
ecb.c crypto: skcipher - Add skcipher_ialg_simple helper 2019-12-27 18:18:04 +08:00
ecc_curve_defs.h
ecc.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
ecc.h crypto: ecc - SP800-56A rev 3 local public key validation 2020-07-31 18:08:59 +10:00
ecdh_helper.c crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() 2021-03-04 11:37:49 +01:00
ecdh.c crypto: ecdh - avoid buffer overflow in ecdh_set_secret() 2021-01-12 20:18:17 +01:00
echainiv.c crypto: geniv - remove unneeded arguments from aead_geniv_alloc() 2020-07-16 21:49:07 +10:00
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
ecrdsa.c crypto: ecrdsa - Fix incorrect use of vli_cmp 2022-06-06 08:42:43 +02:00
essiv.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
fcrypt.c
fips.c
gcm.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
geniv.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
gf128mul.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
ghash-generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
hash_info.c crypto: rename sm3-256 to sm3 in hash_algo_name 2020-02-18 07:35:49 -05:00
hmac.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
internal.h crypto: algapi - Move crypto_yield into internal.h 2020-08-19 21:59:43 +10:00
jitterentropy-kcapi.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
jitterentropy.c crypto: jitter - consider 32 LSB for APT 2022-01-27 10:54:12 +01:00
jitterentropy.h crypto: jitter - add header to fix buildwarnings 2019-10-18 18:49:40 +11:00
Kconfig crypto: memneq - move into lib/ 2022-06-22 14:13:18 +02:00
keywrap.c crypto: skcipher - Add skcipher_ialg_simple helper 2019-12-27 18:18:04 +08:00
khazad.c
kpp.c
lrw.c crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile crypto: memneq - move into lib/ 2022-06-22 14:13:18 +02:00
md4.c
md5.c crypto: md5 - remove unused macros 2020-02-28 08:43:21 +08:00
michael_mic.c crypto: michael_mic - fix broken misalignment handling 2021-03-04 11:38:31 +01:00
nhpoly1305.c crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
ofb.c crypto: skcipher - Add skcipher_ialg_simple helper 2019-12-27 18:18:04 +08:00
pcbc.c crypto: skcipher - Add skcipher_ialg_simple helper 2019-12-27 18:18:04 +08:00
pcrypt.c crypto: pcrypt - Delay write to padata->info 2021-11-18 14:04:12 +01:00
poly1305_generic.c crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
proc.c crypto: proc - Removing some useless only space lines 2020-09-25 17:48:15 +10:00
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS 2021-05-11 14:47:35 +02:00
rsa_helper.c
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - fix buffer overread in pkcs1pad_verify_complete() 2022-04-08 14:39:57 +02:00
rsa.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
scatterwalk.c
scompress.c crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
seed.c
seqiv.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
serpent_generic.c crypto: x86 - Regularize glue function prototypes 2019-12-11 16:36:54 +08:00
sha1_generic.c crypto: lib/sha1 - fold linux/cryptohash.h into crypto/sha.h 2020-05-08 15:32:17 +10:00
sha3_generic.c crypto: Replace HTTP links with HTTPS ones 2020-07-23 17:34:20 +10:00
sha256_generic.c crypto: lib/sha256 - return void 2020-05-08 15:32:12 +10:00
sha512_generic.c
shash.c crypto: shash - avoid comparing pointers to exported functions under CFI 2021-07-14 16:55:54 +02:00
simd.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
skcipher.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
sm2.c crypto: sm2 - fix a memory leak in sm2 2021-07-14 16:56:06 +02:00
sm2signature.asn1 crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm 2020-09-25 17:48:54 +10:00
sm3_generic.c crypto: sm3 - export crypto_sm3_final function 2020-09-25 17:48:53 +10:00
sm4_generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
streebog_generic.c
tcrypt.c crypto: tcrypt - avoid signed overflow in byte count 2021-03-07 12:34:11 +01:00
tcrypt.h crypto: tcrypt - Add support for hash speed testing with keys 2020-08-21 14:45:27 +10:00
tea.c
testmgr.c crypto: sm2 - add SM2 test vectors to testmgr 2020-09-25 17:48:54 +10:00
testmgr.h crypto: sm2 - add SM2 test vectors to testmgr 2020-09-25 17:48:54 +10:00
tgr192.c crypto: tgr192 - remove unneeded semicolon 2019-11-15 13:44:17 +08:00
twofish_common.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
twofish_generic.c
vmac.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
wp512.c
xcbc.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
xor.c crypto: xor - Fix divide error in do_xor_speed() 2021-01-27 11:54:52 +01:00
xts.c crypto: xts - Replace memcpy() invocation with simple assignment 2020-07-31 18:09:00 +10:00
xxhash_generic.c crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
zstd.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00