The branch master has been updated via a5d250e57e88650986e8cf2dff6c698c50eb3255 (commit) from 5bbe2134188a45a937e7aefd46b7eeee258d0ab8 (commit)
- Log ----------------------------------------------------------------- commit a5d250e57e88650986e8cf2dff6c698c50eb3255 Author: Lars Immisch <immi...@adobe.com> Date: Thu Mar 5 11:26:06 2020 +0100 Use getauxval on Android with API level > 18 We received analytics that devices of the device family Oppo A37x are crashing with SIGILL when trying to load libcrypto.so. These crashes were fixed by using the system-supplied getauxval function. Reviewed-by: Kurt Roeckx <k...@roeckx.be> Reviewed-by: Tim Hudson <t...@openssl.org> Reviewed-by: Paul Dale <pa...@openssl.org> Reviewed-by: Tomas Mraz <to...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11257) ----------------------------------------------------------------------- Summary of changes: crypto/armcap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crypto/armcap.c b/crypto/armcap.c index 43438e0aa4..93aeac85a3 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -93,6 +93,15 @@ static unsigned long getauxval(unsigned long key) # endif # endif +/* + * Android: according to https://developer.android.com/ndk/guides/cpu-features, + * getauxval is supported starting with API level 18 + */ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif + /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas * AArch64 used AT_HWCAP.