[PATCH libgcrypt] Disable CPU speculation-related misfeatures

Jussi Kivilinna jussi.kivilinna at iki.fi
Sat Jul 5 13:37:21 CEST 2025


On 14/06/2025 15:47, Guido Trentalancia via Gcrypt-devel wrote:
> Three runs of timed "make check" (with suppressed output) on libgcrypt
> version 1.11.1, with and without the safety feature enabled, provide
> the following meaningful results:
> 
> safe (avg): 54.26 seconds
> 
> unsafe (avg): 52.94 seconds
> 
> Therefore, the performance loss of safe versus unsafe is 2.5%.

Seems high given that "make check" is mostly single threaded test code
running mostly in user-space and checking libgcrypt implementation.

Changing these prctl settings will affect the application where libgcrypt
was loaded (directly or indirectly) and can also affect performance
of other processes running on system (see discussion & push back on
L1d flush change in linux kernel).

-Jussi




More information about the Gcrypt-devel mailing list