From 3a3552247ecb0bfb260a36d9da7a3bce7fdc3f8a Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Wed, 25 Sep 2019 15:51:53 -0700 Subject: [PATCH] Only attempt to mprotect FIPS module for AArch64. This need doesn't arise on other Android platforms at the current time. Change-Id: I38c9b5417ec6717210f5797d86d226ab0d9a4232 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/37744 Reviewed-by: Adam Langley --- crypto/fipsmodule/bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/fipsmodule/bcm.c b/crypto/fipsmodule/bcm.c index 54f113bbf..2706722c0 100644 --- a/crypto/fipsmodule/bcm.c +++ b/crypto/fipsmodule/bcm.c @@ -115,7 +115,7 @@ extern const uint8_t BORINGSSL_bcm_rodata_start[]; extern const uint8_t BORINGSSL_bcm_rodata_end[]; #endif -#if defined(OPENSSL_ANDROID) +#if defined(OPENSSL_ANDROID) && defined(OPENSSL_AARCH64) static void BORINGSSL_maybe_set_module_text_permissions(int permission) { // Android may be compiled in execute-only-memory mode, in which case the // .text segment cannot be read. That conflicts with the need for a FIPS