Kernel 6.3 brings the support of auto-IBRS (AMD Zen 4 processors). However I am stuck with kernel 6.2 series due to a WIP in OpenZFS 2.1.x to support the 6.3 kernel series which, I guess, will take awhile as internal kernel's API has changed in-between. In the meantime, I managed to retrofit this => https://lore.kernel.org/lkml/20230124163319.2277355-1-kim.phillips@amd.com for sys-kernel/gentoo-sources:6.2.10 (AFAK their v9 is the more recent work in the subject at time of writing). Various pieces are spread amongst the discussion nevertheless I am confident that all pieces have been put together. So far the 6.2(.10) kernel can be built and boots normally without any issues :) And... # dmesg | grep Spectre [ 0.228161] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization [ 0.228163] Spectre V2 : Mitigation: Enhanced / Automatic IBRS [ 0.228164] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch [ 0.228166] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier Not tested stability with KVM virtual machines so far but feel free to experiment ;)
Created attachment 859690 [details, diff] Patchset for automatic IBRS retrofitted for Linux 6.2.10 See bug description. The work is based on a Linux 6.2.10 kernel, not sure it will be applicable as-is for future Linux 6.2.x releases.
Can also be applied over a 6.2.6 to 6.2.9 kernel as well according to my tests and probably all earlier 6.2 series kernels (untested). Does not work with 6.1 and earlier kernel series.
(In reply to Adrien Dessemond from comment #2) > Can also be applied over a 6.2.6 to 6.2.9 kernel as well according to my > tests and probably all earlier 6.2 series kernels (untested). > > Does not work with 6.1 and earlier kernel series. Thank-you for your contribution. There's still a lot of conversation on this with debate on how to do things. I'd like to wait a bit before we carry this one.
IBRS came with 6.3 and 6.2 is EOL. Closing this one.