Re: [PATCH] x86/bugs: Allow STIBP with IBRS

From: Borislav Petkov
Date: Mon Feb 20 2023 - 13:35:05 EST


Drop stable@ again.

On Mon, Feb 20, 2023 at 10:27:17AM -0800, Josh Poimboeuf wrote:
> IBRS is only enabled in kernel space. Since it's not enabled in user
> space, user space isn't protected from indirect branch prediction
> attacks from a sibling CPU thread.
>
> Allow STIBP to be enabled to protect against such attacks.
>
> Fixes: 7c693f54c873 ("x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS")

Yah, look at that one:

commit 7c693f54c873691a4b7da05c7e0f74e67745d144
Author: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
Date: Tue Jun 14 23:15:55 2022 +0200

x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS

Extend spectre_v2= boot option with Kernel IBRS.

[jpoimboe: no STIBP with IBRS]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm assuming this was supposed to mean no STIBP in *kernel mode* when
IBRS is selected?

In user mode, STIBP should be selectable as we disable IBRS there.

Close?

If so, pls document it too while at it:

Documentation/admin-guide/hw-vuln/spectre.rst

because we will be wondering next time again.

Like we wonder each time this madness is being touched. ;-(

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette