crypto: powerpc - Include uaccess.h and others
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Apr 2025 07:34:59 +0000 (15:34 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Apr 2025 07:36:23 +0000 (15:36 +0800)
The powerpc aes/ghash code was relying on pagefault_disable from
being pulled in by random header files.

Fix this by explicitly including uaccess.h.  Also add other missing
header files to prevent similar problems in future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/powerpc/crypto/aes.c
arch/powerpc/crypto/aes_cbc.c
arch/powerpc/crypto/aes_ctr.c
arch/powerpc/crypto/aes_xts.c
arch/powerpc/crypto/ghash.c

index ec06189fbf9963b840dbc61ed9c6c2d9d428330e..3f1e5e8949021e63721e0ea98e9441afe9c13371 100644 (file)
@@ -7,15 +7,15 @@
  * Author: Marcelo Henrique Cerri <mhcerri@br.ibm.com>
  */
 
-#include <linux/types.h>
-#include <linux/err.h>
-#include <linux/crypto.h>
-#include <linux/delay.h>
 #include <asm/simd.h>
 #include <asm/switch_to.h>
 #include <crypto/aes.h>
 #include <crypto/internal/cipher.h>
 #include <crypto/internal/simd.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/uaccess.h>
 
 #include "aesp8-ppc.h"
 
index ed0debc7acb5fb91a29e7a04a2e9510f72076dfb..5f2a4f375eefeae525524251a3e5a28aed37399d 100644 (file)
 #include <crypto/aes.h>
 #include <crypto/internal/simd.h>
 #include <crypto/internal/skcipher.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/uaccess.h>
 
 #include "aesp8-ppc.h"
 
index 3da75f42529a534b50a760133338eb9ffa396d5d..e27c4036e711642067b8ead873ce9060deb3a894 100644 (file)
 #include <crypto/aes.h>
 #include <crypto/internal/simd.h>
 #include <crypto/internal/skcipher.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/uaccess.h>
 
 #include "aesp8-ppc.h"
 
index dabbccb415502ccebb7b335ece652cc627ddcc60..9440e771cedec8f8e9bf419120c4d9d14f896e02 100644 (file)
 #include <crypto/internal/simd.h>
 #include <crypto/internal/skcipher.h>
 #include <crypto/xts.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/uaccess.h>
 
 #include "aesp8-ppc.h"
 
index 77eca20bc7ac6190c60963c26a250932d4623738..9bb61a843fd3dcab0a12e473f7947cd329d7b842 100644 (file)
  *   Copyright (C) 2014 - 2018 Linaro Ltd. <ard.biesheuvel@linaro.org>
  */
 
-#include <linux/types.h>
-#include <linux/err.h>
-#include <linux/crypto.h>
-#include <linux/delay.h>
+#include "aesp8-ppc.h"
 #include <asm/simd.h>
 #include <asm/switch_to.h>
 #include <crypto/aes.h>
+#include <crypto/b128ops.h>
 #include <crypto/ghash.h>
-#include <crypto/scatterwalk.h>
 #include <crypto/internal/hash.h>
 #include <crypto/internal/simd.h>
-#include <crypto/b128ops.h>
-#include "aesp8-ppc.h"
+#include <crypto/scatterwalk.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/uaccess.h>
 
 void gcm_init_p8(u128 htable[16], const u64 Xi[2]);
 void gcm_gmult_p8(u64 Xi[2], const u128 htable[16]);