aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/crypto/shash.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-11-18 11:44:17 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2022-11-25 17:39:19 +0800
commit2d203c46a0fa5df0785383b13b722483e1fd27a8 (patch)
tree51981b272a0c1c3eb115eb311a0ff4a65600dbef /crypto/shash.c
parentcrypto: x86/sm3 - fix possible crash with CFI enabled (diff)
downloadwireguard-linux-2d203c46a0fa5df0785383b13b722483e1fd27a8.tar.xz
wireguard-linux-2d203c46a0fa5df0785383b13b722483e1fd27a8.zip
crypto: x86/sm4 - fix crash with CFI enabled
sm4_aesni_avx_ctr_enc_blk8(), sm4_aesni_avx_cbc_dec_blk8(), sm4_aesni_avx_cfb_dec_blk8(), sm4_aesni_avx2_ctr_enc_blk16(), sm4_aesni_avx2_cbc_dec_blk16(), and sm4_aesni_avx2_cfb_dec_blk16() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure. (Or at least that should be the case. For some reason the CFI checks in sm4_avx_cbc_decrypt(), sm4_avx_cfb_decrypt(), and sm4_avx_ctr_crypt() are not always being generated, using current tip-of-tree clang. Anyway, this patch is a good idea anyway.) Fixes: ccace936eec7 ("x86: Add types to indirectly called assembly functions") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/shash.c')
0 files changed, 0 insertions, 0 deletions