Browse Source

Don't set a default armcap state in dynamic armcap modes.

The getauxval (and friends) code would be filling that in anyway. The default
only serves to enable NEON even if the OS is old enough to be missing getauxval
(and everything else).

Notably, this unbreaks the has_buggy_neon code when __ARM_NEON__ is set, as is
the case in Chrome for Android, as of M50.  Before, the default
OPENSSL_armcap_P value was getting in the way.

Arguably, this doesn't make a whole lot of sense. We're saying we'll let the
CPU run compiler-generated NEON code, but not our hand-crafted stuff. But, so
far, we only have evidence of the hand-written NEON tickling the bug and not
the compiler-generated stuff, so avoid the unintentional regression. (Naively,
I would expect the hand-crafted NEON is better at making full use of the
pipeline and is thus more likely to tickle the CPU bug.)

This is not the fix for M50, as in the associated Chromium bug, but it will fix
master and M51. M50 will instead want to revert
https://codereview.chromium.org/1730823002.

BUG=chromium:606629

Change-Id: I394f97fea2f09891dd8fa30e0ec6fc6b1adfab7a
Reviewed-on: https://boringssl-review.googlesource.com/7794
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 8 years ago
committed by Adam Langley
parent
commit
2b4820bd52
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      crypto/crypto.c

+ 0
- 2
crypto/crypto.c View File

@@ -79,8 +79,6 @@ uint32_t OPENSSL_armcap_P =
#endif
0;

#elif defined(__ARM_NEON__)
uint32_t OPENSSL_armcap_P = ARMV7_NEON;
#else
uint32_t OPENSSL_armcap_P = 0;
#endif


Loading…
Cancel
Save