[gnutls-devel] GnuTLS | accelerated: clear AVX bits if it cannot be queried through XSAVE (!1631)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Aug 24 13:58:25 CEST 2022

Hubert Kario (@mention me if you need reply) started a new discussion on lib/accelerated/x86/x86-common.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1631#note_1075950318

>  	if (capabilities == 0) {
>  		if (!read_cpuid_vals(_gnutls_x86_cpuid_s))
>  			return;
> +		if (!check_4th_gen_intel_features(_gnutls_x86_cpuid_s[1])) {
> +			_gnutls_x86_cpuid_s[1] &= ~bit_AVX;
> +
> +			/* Clear AVX2 bits as well, according to what
> +			 * OpenSSL does.  Should we clear
> +			 * bit_AVX512DQ, bit_AVX512PF, bit_AVX512ER,
> +			 * and bit_AVX512CD? */

It depends on how the CRYPTOGRAMS code checks for those flags, if they check for AVX512F and one of those, then no, we don't have to; OTOH, if they look at one of those flags only, then they will need to be cleared too

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1631#note_1075950318
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220824/d150c271/attachment-0001.html>

More information about the Gnutls-devel mailing list