mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Don't permit users to request a subset of the AVX512 or MPX xsave masks.
These masks are documented in the Intel Architecture Instruction Set Extensions Programming Reference (March 2014). Reviewed by: kib MFC after: 1 month
This commit is contained in:
parent
d8d025897e
commit
0eb7ae8d0a
1 changed files with 4 additions and 0 deletions
|
|
@ -199,6 +199,10 @@ fpuinit_bsp1(void)
|
|||
TUNABLE_ULONG_FETCH("hw.xsave_mask", &xsave_mask_user);
|
||||
xsave_mask_user |= XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE;
|
||||
xsave_mask &= xsave_mask_user;
|
||||
if ((xsave_mask & XFEATURE_AVX512) != XFEATURE_AVX512)
|
||||
xsave_mask &= ~XFEATURE_AVX512;
|
||||
if ((xsave_mask & XFEATURE_MPX) != XFEATURE_MPX)
|
||||
xsave_mask &= ~XFEATURE_MPX;
|
||||
|
||||
cpuid_count(0xd, 0x1, cp);
|
||||
if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue