boringssl_self_test: Enable optimization.
libcrypto performs a self test when it is loaded, unless a marker file /dev/boringssl/selftest/[hash] exists which indicates that the self test has already successfully completed since the last time the device was booted. Before this CL topic, libcrypto attempted to create the marker file when the self test successfully completed. On Android, dedicated boringssl_self_test{32,64} binaries are run early during boot and are the only binaries (apart from init and vendor_int) that have permission to create these files. Another CL in this topic stops the boringssl self test creating a marker file unless the environment variable BORINGSSL_SELF_TEST_CREATE_FLAG is set to a nonempty value. This CL sets that value to "true" when running the dedicated self test binaries, but not for other binaries. This has the effect that other binaries that run the self test early during boot (before the dedicated self test binaries have created the marker files) and which run the self test will no longer attempt to create the marker file, which SELinux would have denied anyway. Bug: 137267623 Test: Treehugger Change-Id: I99317df1a8c3496d33ae83f9ec346782b2286ac9
Loading
Please register or sign in to comment