Skip to contentSkip to conversation

x86/fpu: Disable AVX when eagerfpu is off

DISCUSSION Julian Stecklina 2 participants 3 messages Jun 15, 2018 Stable branch

lore
Share & tools
lore
#0 lore raw

Yu,

Regarding your patch to disable AVX with eager fpu disabled in the 4.4 stable queue:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.4/x86-fpu-disable-mpx-when-eagerfpu-is-off.patch

Why would this be necessary? In the Intel SDM Vol 2, Chapter 2.4, FPU/SIMD instructions are grouped into different classes and for all of them CR0.TS triggers a #NM exception in all modes but real mode and virtual 8086 mode.

It seems to me lazy context switching of AVX is perfectly functional (disregarding the recently disclosed security issue). Am I missing something?

Julian

#1 lore raw
Quoted 12 lines · Julian Stecklina

Yu,

Regarding your patch to disable AVX with eager fpu disabled in the 4.4 stable queue:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.4/x86-fpu-disable-mpx-when-eagerfpu-is-off.patch

Why would this be necessary? In the Intel SDM Vol 2, Chapter 2.4, FPU/SIMD instructions are grouped into different classes and for all of them CR0.TS triggers a #NM exception in all modes but real mode and virtual 8086 mode.

Quoted 5 lines

It seems to me lazy context switching of AVX is perfectly functional (disregarding the recently disclosed security issue). Am I missing something?

Julian

This is for MPX, not AVX.

Yu-cheng

#2 lore raw
Quoted 16 lines · Yu-cheng Yu
Quoted 3 lines · Julian Stecklina

Yu,

Regarding your patch to disable AVX with eager fpu disabled in the

4.4

Quoted 3 lines

stable queue:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.4/x86-fpu-disable-mpx-when-eagerfpu-is-off.patch

Quoted 3 lines

Why would this be necessary? In the Intel SDM Vol 2, Chapter 2.4, FPU/SIMD instructions are grouped into different classes and for all

of

Quoted 3 lines

them CR0.TS triggers a #NM exception in all modes but real mode and virtual 8086 mode.

Quoted 7 lines
Quoted 5 lines

It seems to me lazy context switching of AVX is perfectly functional (disregarding the recently disclosed security issue). Am I missing something?

Julian

This is for MPX, not AVX.

Wrong link. There was another one for AVX, but I saw it got reverted. Nevermind then. ;)

Julian