News: 0001516272

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux Prepares AMD "SRSO_USER_KERNEL_NO" Support For Zen 5 CPUs

([AMD] 83 Minutes Ago SRSO_USER_KERNEL_NO)


Queued up this week via the tip/tip.git's "x86/bugs" Git branch for the Linux kernel is AMD "SRSO_USER_KERNEL_NO" support as a new SRSO/Inception mitigation handling seemingly for Zen 5 processors and beyond.

Disclosed back in mid-2023 was the [1]Inception / Speculative Return Stack Overflow (SRSO) vulnerability as [2]a speculative side channel attack for Zen 3 and Zen 4 processors at the time. With the recently launched AMD Zen 5 processors, they have [3]reported "not affected" to Inception/SRSO but it looks like that isn't as clear-cut given the new patch activity around SRSO_USER_KERNEL_NO.

For CPUs indicating SRSO_USER_KERNEL_NO, they indicate the processor is not subject to the SRSO vulnerability across user/kernel boundaries but for cloud/virtualization use need to still utilize an Indirect Branch Predictor Barrier (IBPB) on VMEXIT. Per [4]this patch :

"If the machine has:

CPUID Fn8000_0021_EAX[30] (SRSO_USER_KERNEL_NO) -- If this bit is 1, it indicates the CPU is not subject to the SRSO vulnerability across user/kernel boundaries.

have it fall back to IBPB on VMEXIT only, in the case it is going to run VMs:

Speculative Return Stack Overflow: Mitigation: IBPB on VMEXIT only"

So for CPUs with SRSO_USER_KERNEL_NO, SRSO/Inception is basically not affected unless you are running virtual machines where an IBPB on VMEXIT will need to be applied for safe operation.

Not noted with that patch message but when looking at the code:

The patch now marks AMD 0x1a processors as affected. With Family 1a being the new AMD Zen 5 processors. So seemingly this SRSO_USER_KERNEL_NO is intended for Zen 5 systems and thereby taking the processors from the prior "Not affected" state for Inception/SRSO to the new "IBPB on VMEXIT only" mitigation with SRSO_USER_KERNEL_NO. But again no real difference for users unless you are running VMs.

With these SRSO_USER_KERNEL_NO patches in tip/tip.git's x86/bugs branch, it will likely be submitted as material for the Linux 6.14 merge window opening later this month unless it's decided to be urgent and then could come in as part of the "fixes" for Linux v6.13.



[1] https://www.phoronix.com/news/AMD-Inception-Cleanup

[2] https://www.phoronix.com/news/AMD-INCEPTION

[3] https://www.phoronix.com/review/amd-zen5-mitigations-off

[4] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/bugs&id=877818802c3e970f67ccb53012facc78bef5f97a



phoronix

We don't need no indirection We don't need no compilation
We don't need no flow control We don't need no load control
No data typing or declarations No link edit for external bindings
Hey! did you leave the lists alone? Hey! did you leave that source alone?
Chorus: (Chorus)
Oh No. It's just a pure LISP function call.

We don't need no side-effecting We don't need no allocation
We don't need no flow control We don't need no special-nodes
No global variables for execution No dark bit-flipping for debugging
Hey! did you leave the args alone? Hey! did you leave those bits alone?
(Chorus) (Chorus)
-- "Another Glitch in the Call", a la Pink Floyd