Module Name: src Committed By: riastradh Date: Sun Jul 19 15:33:08 UTC 2020
Modified Files: src/crypto/external/bsd/openssl/dist/crypto: ppccap.c Log Message: Expand on importance of not using fpu for crypto if there's no fpu. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 \ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.17 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.18 --- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.17 Wed Jul 15 08:14:41 2020 +++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c Sun Jul 19 15:33:08 2020 @@ -374,8 +374,11 @@ void OPENSSL_cpuid_setup(void) size_t len = sizeof(val); /* - * If machdep.fpu_present == 0, FPU is absent and emulated by software. - * Avoid using it for better performance. + * If machdep.fpu_present == 0, FPU is absent and emulated by + * software. In that case, using FPU instructions hurts rather + * than helps performance, and the software is unlikely to run in + * constant time so it would expose us to timing side channel + * attacks. So don't do it! */ error = sysctlbyname("machdep.fpu_present", &val, &len, NULL, 0); if (error != 0 || (error == 0 && val != 0))