summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Bentley <prb@google.com>2022-07-07 15:18:55 +0100
committerAlain Vongsouvanh <alainv@google.com>2023-03-24 15:59:07 +0000
commit8301b33dad51cafd9d08876fc91a7e5fa556dcd3 (patch)
tree770486c47fbedcf2f8a330268ad751fb39df6635
parent4fb1bf6eecff0948d49c280429c2fa6dd58bdee2 (diff)
downloadcore-android13-qpr3-c-s3-release.tar.gz
In previous releases, these self tests had a secondary purpose of writing a flag file to save future processes from running some slow self checks. This is no longer true in T. However running the tests from early-init has caused issues on some devices as the kernel's entropy pool is not yet initialised, causing the process to block for a second or more. Bug: 231946889 Bug: 249037600 Test: m && flashall Change-Id: I2116f2029ca6a21e4359407dfff4dc79edd39084 Merged-In: I2116f2029ca6a21e4359407dfff4dc79edd39084
-rw-r--r--rootdir/init.rc53
1 files changed, 27 insertions, 26 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index c3216da52..2b53d883e 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -86,32 +86,6 @@ on early-init
mkdir /dev/sys/fs 0755 system system
mkdir /dev/sys/block 0755 system system
-# Run boringssl self test for each ABI so that later processes can skip it. http://b/139348610
-on early-init && property:ro.product.cpu.abilist32=*
- exec_start boringssl_self_test32
-on early-init && property:ro.product.cpu.abilist64=*
- exec_start boringssl_self_test64
-on property:apexd.status=ready && property:ro.product.cpu.abilist32=*
- exec_start boringssl_self_test_apex32
-on property:apexd.status=ready && property:ro.product.cpu.abilist64=*
- exec_start boringssl_self_test_apex64
-
-service boringssl_self_test32 /system/bin/boringssl_self_test32
- reboot_on_failure reboot,boringssl-self-check-failed
- stdio_to_kmsg
-
-service boringssl_self_test64 /system/bin/boringssl_self_test64
- reboot_on_failure reboot,boringssl-self-check-failed
- stdio_to_kmsg
-
-service boringssl_self_test_apex32 /apex/com.android.conscrypt/bin/boringssl_self_test32
- reboot_on_failure reboot,boringssl-self-check-failed
- stdio_to_kmsg
-
-service boringssl_self_test_apex64 /apex/com.android.conscrypt/bin/boringssl_self_test64
- reboot_on_failure reboot,boringssl-self-check-failed
- stdio_to_kmsg
-
on init
sysclktz 0
@@ -502,6 +476,33 @@ on init
start hwservicemanager
start vndservicemanager
+# Run boringssl self test for each ABI. Any failures trigger reboot to firmware.
+on init && property:ro.product.cpu.abilist32=*
+ exec_start boringssl_self_test32
+on init && property:ro.product.cpu.abilist64=*
+ exec_start boringssl_self_test64
+on property:apexd.status=ready && property:ro.product.cpu.abilist32=*
+ exec_start boringssl_self_test_apex32
+on property:apexd.status=ready && property:ro.product.cpu.abilist64=*
+ exec_start boringssl_self_test_apex64
+
+service boringssl_self_test32 /system/bin/boringssl_self_test32
+ reboot_on_failure reboot,boringssl-self-check-failed
+ stdio_to_kmsg
+
+service boringssl_self_test64 /system/bin/boringssl_self_test64
+ reboot_on_failure reboot,boringssl-self-check-failed
+ stdio_to_kmsg
+
+service boringssl_self_test_apex32 /apex/com.android.conscrypt/bin/boringssl_self_test32
+ reboot_on_failure reboot,boringssl-self-check-failed
+ stdio_to_kmsg
+
+service boringssl_self_test_apex64 /apex/com.android.conscrypt/bin/boringssl_self_test64
+ reboot_on_failure reboot,boringssl-self-check-failed
+ stdio_to_kmsg
+
+
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1