Repository navigation
Allow disabling ML-DSA AVX2/512 specifically with WC_MLDSA_NO_AVX2. Disable AVX512 AES code with NO_VAES_SUPPORT, as it is also VAES. - #11931
Conversation
|
@claude review |
|
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline finding, I also checked the ML-DSA side. With WC_MLDSA_NO_AVX2 set, every AVX512 dispatch in wc_mldsa.c sits under WOLFSSL_MLDSA_HAVE_INTEL_AVX512, so it compiles out and nothing reaches it at runtime through IS_INTEL_AVX512. The IS_INTEL_AVX2 and SHA3_USE_AVX2 overrides come after their definitions in cpuid.h and sha3.h and before their first use. The header gate in wc_mldsa.h only removes function prototypes and doesn't change any struct layout.
Extended reasoning...
One finding was already reported, about the AES asm guards. This note covers the ML-DSA half of the change, which was checked separately and showed no issue: the AVX512 code is fully compiled out, the macro overrides are in the right place, and the header gate changes no struct layout.
Disable AVX512 AES code with NO_VAES_SUPPORT, as it is also VAES.
1d6a8f0 to
65300bb
Compare
|
Retest this please |
Description
Fixes zd#22620
Testing
Built in tests
Checklist