WSL2-Linux-Kernel/include/crypto/internal
Ard Biesheuvel 22ca9f4aaf crypto: shash - avoid comparing pointers to exported functions under CFI
crypto_shash_alg_has_setkey() is implemented by testing whether the
.setkey() member of a struct shash_alg points to the default version,
called shash_no_setkey(). As crypto_shash_alg_has_setkey() is a static
inline, this requires shash_no_setkey() to be exported to modules.

Unfortunately, when building with CFI, function pointers are routed
via CFI stubs which are private to each module (or to the kernel proper)
and so this function pointer comparison may fail spuriously.

Let's fix this by turning crypto_shash_alg_has_setkey() into an out of
line function.

Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-06-17 15:07:31 +08:00
..
acompress.h
aead.h
akcipher.h
blake2b.h crypto: blake2b - sync with blake2s implementation 2021-01-03 08:41:39 +11:00
blake2s.h crypto: blake2s - adjust include guard naming 2021-01-03 08:41:38 +11:00
chacha.h
cipher.h crypto: remove cipher routines from public crypto API 2021-01-03 08:41:35 +11:00
cryptouser.h
des.h
geniv.h
hash.h crypto: shash - avoid comparing pointers to exported functions under CFI 2021-06-17 15:07:31 +08:00
kpp.h
poly1305.h crypto: poly1305 - fix poly1305_core_setkey() declaration 2021-04-02 18:28:12 +11:00
rng.h
rsa.h
scompress.h
simd.h
skcipher.h crypto: x86 - remove glue helper module 2021-01-14 17:10:29 +11:00