Skip to contentSkip to conversation

crypto: x86/sha256 - Include asm/fpu/api.h directly

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 23, 2025 – Apr 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: x86/sha256 - Include asm/fpu/api.h directly

From: Arnd Bergmann <[email protected]>

This was previously included through another header, but now causes a build failure in some configurations:

arch/x86/crypto/sha256_ssse3_glue.c:63:2: error: call to undeclared function 'kernel_fpu_begin'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

   63 |         kernel_fpu_begin();
      |         ^
arch/x86/crypto/sha256_ssse3_glue.c:65:2: error: call to undeclared function 'kernel_fpu_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   65 |         kernel_fpu_end();
      |         ^

Include the header directly to make it build again.

Fixes 8e7547473875 ("crypto: x86/sha256 - Use API partial block handling")
---
 arch/x86/crypto/sha256_ssse3_glue.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/crypto/sha256_ssse3_glue.c +2 -0
index b3115e207a9f..42b0bb6c8caf 100644
@@ -36,6 +36,8 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
+#include <asm/fpu/api.h>
+
 asmlinkage void sha256_transform_ssse3(struct crypto_sha256_state *state,
 				       const u8 *data, int blocks);
 
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

This was previously included through another header, but now causes a build failure in some configurations:

arch/x86/crypto/sha256_ssse3_glue.c:63:2: error: call to undeclared function 'kernel_fpu_begin'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

   63 |         kernel_fpu_begin();
      |         ^
arch/x86/crypto/sha256_ssse3_glue.c:65:2: error: call to undeclared function 'kernel_fpu_end'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   65 |         kernel_fpu_end();
      |         ^
Quoted 7 lines

Include the header directly to make it build again.

Fixes 8e7547473875 ("crypto: x86/sha256 - Use API partial block handling")
---
 arch/x86/crypto/sha256_ssse3_glue.c | 2 ++
 1 file changed, 2 insertions(+)

Sorry, I had pushed out the wrong tree. It should be fixed in cryptodev already:

https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=eba187a6e7141a1166a68c4d27b4ee5a27670b3b

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt