[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 15:37:37 CEST 2022




Daiki Ueno commented on a discussion on lib/accelerated/x86/x86-common.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1631#note_1076122956

>  	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? */

Yes, here is the [reference](https://github.com/openssl/openssl/blob/4d32f5332fa69ac949feec54c273fe63639ad891/crypto/x86_64cpuid.pl#L218).

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1631#note_1076122956
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/5d5f22ce/attachment-0001.html>


More information about the Gnutls-devel mailing list