fips: use memory ordering rather than locks
authorPauli <pauli@openssl.org>
Tue, 13 Jun 2023 01:39:23 +0000 (11:39 +1000)
committerPauli <pauli@openssl.org>
Wed, 14 Jun 2023 06:45:16 +0000 (16:45 +1000)
commitf5690fecb3b0db604e4826323ea5a5e2c403e62f
tree977c330078d67716e6b8d87d0ce7c9d8a5591076
parentc553c08232f7dc7eab0a4b9a739b9295feb0d666
fips: use memory ordering rather than locks

The FIPS provider accesses it's current state under lock.
This is overkill, little or no synchronisation is actually required in
practice (because it's essentially a read only setting).  Switch to using
TSAN operations in preference.

Fixes #21179

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21187)

(cherry picked from commit 8e9ca334528e0a923c4deb0af250a60510974be0)
providers/fips/self_test.c