lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Jul 2019 17:49:09 +0300
From:   Iuliana Prodan <iuliana.prodan@....com>
To:     Herbert Xu <herbert@...dor.apana.org.au>,
        Horia Geanta <horia.geanta@....com>,
        Aymen Sghaier <aymen.sghaier@....com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-imx <linux-imx@....com>
Subject: [PATCH] crypto: caam - move shared symbols in a common location

Moved to a common location the symbols shared by all CAAM drivers (jr,
qi, qi2).

Signed-off-by: Iuliana Prodan <iuliana.prodan@....com>
---
This patch depends on series:
https://patchwork.kernel.org/project/linux-crypto/list/?series=147479

 drivers/crypto/caam/common_if.c | 7 +++++++
 drivers/crypto/caam/common_if.h | 7 +++++++
 drivers/crypto/caam/error.c     | 6 ------
 drivers/crypto/caam/error.h     | 5 -----
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/crypto/caam/common_if.c b/drivers/crypto/caam/common_if.c
index 1291d3d..071b08d 100644
--- a/drivers/crypto/caam/common_if.c
+++ b/drivers/crypto/caam/common_if.c
@@ -7,6 +7,13 @@
 
 #include "compat.h"
 #include "common_if.h"
+#include <linux/types.h>
+
+bool caam_little_end;
+EXPORT_SYMBOL(caam_little_end);
+
+bool caam_imx;
+EXPORT_SYMBOL(caam_imx);
 
 /*
  * validate key length for AES algorithms
diff --git a/drivers/crypto/caam/common_if.h b/drivers/crypto/caam/common_if.h
index 61d5516..5fb8840 100644
--- a/drivers/crypto/caam/common_if.h
+++ b/drivers/crypto/caam/common_if.h
@@ -8,6 +8,8 @@
 #ifndef CAAM_COMMON_LOCATION_H
 #define CAAM_COMMON_LOCATION_H
 
+#include "desc.h"
+
 int check_aes_keylen(unsigned int keylen);
 
 int check_gcm_authsize(unsigned int authsize);
@@ -16,4 +18,9 @@ int check_rfc4106_authsize(unsigned int authsize);
 
 int check_ipsec_assoclen(unsigned int assoclen);
 
+static inline bool is_mdha(u32 algtype)
+{
+	return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
+	       OP_ALG_CHA_MDHA;
+}
 #endif /* CAAM_COMMON_LOCATION_H */
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index b7fbf1b..b901872 100644
--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -50,12 +50,6 @@ void caam_dump_sg(const char *prefix_str, int prefix_type,
 #endif /* DEBUG */
 EXPORT_SYMBOL(caam_dump_sg);
 
-bool caam_little_end;
-EXPORT_SYMBOL(caam_little_end);
-
-bool caam_imx;
-EXPORT_SYMBOL(caam_imx);
-
 static const struct {
 	u8 value;
 	const char *error_text;
diff --git a/drivers/crypto/caam/error.h b/drivers/crypto/caam/error.h
index 16809fa..e2f6ed8 100644
--- a/drivers/crypto/caam/error.h
+++ b/drivers/crypto/caam/error.h
@@ -21,9 +21,4 @@ void caam_dump_sg(const char *prefix_str, int prefix_type,
 		  int rowsize, int groupsize, struct scatterlist *sg,
 		  size_t tlen, bool ascii);
 
-static inline bool is_mdha(u32 algtype)
-{
-	return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) ==
-	       OP_ALG_CHA_MDHA;
-}
 #endif /* CAAM_ERROR_H */
-- 
2.1.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ