Mailing List Archive

[PATCH] cipher/cipher-gcm: fix build failure on ARM NEON
'features' is only defined when relevant CPU features are found, but
one of the uses below its definition checked for GCM_USE_ARM_NEON which
wasn't in the guard above it.

i.e. We used to only define 'features' when:
- GCM_USE_INTEL_PCLMUL
- GCM_USE_ARM_PMULL
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
is set.

We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON
below, it'd fail as features wasn't defined.

Bug: https://bugs.gentoo.org/831397
---
cipher/cipher-gcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
index a039c5e9..22834f35 100644
--- a/cipher/cipher-gcm.c
+++ b/cipher/cipher-gcm.c
@@ -583,7 +583,8 @@ static void
setupM (gcry_cipher_hd_t c)
{
#if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \
- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM)
+ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \
+ defined(GCM_USE_PPC_VPMSUM)
unsigned int features = _gcry_get_hw_features ();
#endif

--
2.34.1


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
[PATCH] cipher/cipher-gcm: fix build failure on ARM NEON [ In reply to ]
'features' is only defined when relevant CPU features are found, but
one of the uses below its definition checked for GCM_USE_ARM_NEON which
wasn't in the guard above it.

i.e. We used to only define 'features' when:
- GCM_USE_INTEL_PCLMUL
- GCM_USE_ARM_PMULL
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
is set.

We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON
below, it'd fail as features wasn't defined.

Bug: https://bugs.gentoo.org/831397
---
cipher/cipher-gcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
index a039c5e9..22834f35 100644
--- a/cipher/cipher-gcm.c
+++ b/cipher/cipher-gcm.c
@@ -583,7 +583,8 @@ static void
setupM (gcry_cipher_hd_t c)
{
#if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \
- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM)
+ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \
+ defined(GCM_USE_PPC_VPMSUM)
unsigned int features = _gcry_get_hw_features ();
#endif

--
2.34.1


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
[PATCH] cipher/cipher-gcm: fix build failure on ARM NEON [ In reply to ]
'features' is only defined when relevant CPU features are found, but
one of the uses below its definition checked for GCM_USE_ARM_NEON which
wasn't in the guard above it.

i.e. We used to only define 'features' when:
- GCM_USE_INTEL_PCLMUL
- GCM_USE_ARM_PMULL
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
- GCM_USE_S390X_CRYPTO
- GCM_USE_PPC_VPMSUM
is set.

We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON
below, it'd fail as features wasn't defined.

Bug: https://bugs.gentoo.org/831397
---
cipher/cipher-gcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
index a039c5e9..22834f35 100644
--- a/cipher/cipher-gcm.c
+++ b/cipher/cipher-gcm.c
@@ -583,7 +583,8 @@ static void
setupM (gcry_cipher_hd_t c)
{
#if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \
- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM)
+ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \
+ defined(GCM_USE_PPC_VPMSUM)
unsigned int features = _gcry_get_hw_features ();
#endif

--
2.34.1


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel