Bläddra i källkod

Fix bsaes-armv7.pl getting disabled by accident.

https://boringssl-review.googlesource.com/c/34188 accidentally disabled
it (__ARM_MAX_ARCH__ wasn't defined), which, in turn, masked a bug in
https://boringssl-review.googlesource.com/c/34874.

Remove the __ARM_MAX_ARCH__ check as that's hardcoded to 8 anyway. Then
revert the problematic part of the bsaes-armv7.pl change. That brings
back the somewhat questionable post-dispatch to pre-dispatch call, but I
hope to patch the fallbacks out soon anyway.

Change-Id: I567e55fe35cb716d5ed56580113a302617f5ad71
Reviewed-on: https://boringssl-review.googlesource.com/c/35044
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 5 år sedan
committed by CQ bot account: commit-bot@chromium.org
förälder
incheckning
f1f73f8966
3 ändrade filer med 7 tillägg och 8 borttagningar
  1. +6
    -3
      crypto/fipsmodule/aes/asm/bsaes-armv7.pl
  2. +1
    -1
      crypto/fipsmodule/aes/internal.h
  3. +0
    -4
      crypto/fipsmodule/cipher/e_aes.c

+ 6
- 3
crypto/fipsmodule/aes/asm/bsaes-armv7.pl Visa fil

@@ -1113,7 +1113,10 @@ my ($inp,$out,$len,$key, $ivp,$fp,$rounds)=map("r$_",(0..3,8..10));
my ($keysched)=("sp");

$code.=<<___;
.extern aes_nohw_cbc_encrypt
@ TODO(davidben): This should be aes_nohw_cbc_encrypt, but that function does
@ not exist. Rather than add it, patch this fallback out. See
@ https://crbug.com/boringssl/256.
.extern AES_cbc_encrypt
.extern aes_nohw_decrypt

.global bsaes_cbc_encrypt
@@ -1123,10 +1126,10 @@ bsaes_cbc_encrypt:
#ifndef __KERNEL__
cmp $len, #128
#ifndef __thumb__
blo aes_nohw_cbc_encrypt
blo AES_cbc_encrypt
#else
bhs 1f
b aes_nohw_cbc_encrypt
b AES_cbc_encrypt
1:
#endif
#endif


+ 1
- 1
crypto/fipsmodule/aes/internal.h Visa fil

@@ -49,7 +49,7 @@ OPENSSL_INLINE char bsaes_capable(void) { return vpaes_capable(); }

OPENSSL_INLINE int hwaes_capable(void) { return CRYPTO_is_ARMv8_AES_capable(); }

#if defined(OPENSSL_ARM) && __ARM_MAX_ARCH__ >= 7
#if defined(OPENSSL_ARM)
#define BSAES
OPENSSL_INLINE char bsaes_capable(void) { return CRYPTO_is_NEON_capable(); }
#endif


+ 0
- 4
crypto/fipsmodule/cipher/e_aes.c Visa fil

@@ -64,10 +64,6 @@
#include "../modes/internal.h"
#include "../delocate.h"

#if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
#include <openssl/arm_arch.h>
#endif


OPENSSL_MSVC_PRAGMA(warning(push))
OPENSSL_MSVC_PRAGMA(warning(disable: 4702)) // Unreachable code.


Laddar…
Avbryt
Spara