x86/nospec: Unwreck the RSB stuffing
authorPeter Zijlstra <peterz@infradead.org>
Tue, 16 Aug 2022 12:28:36 +0000 (14:28 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 19 Aug 2022 11:24:32 +0000 (13:24 +0200)
commit4e3aa9238277597c6c7624f302d81a7b568b6f2d
tree0d5abcf5ea5bb945d4c80dfbae44fe0b5e1367fb
parent7df548840c496b0141fb2404b889c346380c2b22
x86/nospec: Unwreck the RSB stuffing

Commit 2b1299322016 ("x86/speculation: Add RSB VM Exit protections")
made a right mess of the RSB stuffing, rewrite the whole thing to not
suck.

Thanks to Andrew for the enlightening comment about Post-Barrier RSB
things so we can make this code less magical.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/YvuNdDWoUZSBjYcm@worktop.programming.kicks-ass.net
arch/x86/include/asm/nospec-branch.h