On 11/2/22 15:27, Elliott, Robert (Servers) wrote:
3. Similarly, modules using X86_FEATURE_XMM2 probably need to check XFEATURE_MASK_SSE: Currently checking XSAVE SSE: aegis128-aesni-glue Current not checking XSAVE SSE: nhpoly1305-sse2_glue serpent_sse2_glue
These should check boot_cpu_has(X86_FEATURE_FXSR). Checking XFEATURE_MASK_SSE will fail on systems without XSAVE, because fpu_kernel_cfg.max_features is zero there (see fpu__init_system_xstate() in arch/x86/kernel/fpu/xstate.c).
It happens to work for aegis128-aesni-glue because AES instructions only exist on new-enough parts, but it should probably be changed as well.
Paolo