Revert "x86/bugs: Use fixed addressing for VERW operand"
authorDave Hansen <dave.hansen@linux.intel.com>
Tue, 12 Mar 2024 14:27:57 +0000 (07:27 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Tue, 12 Mar 2024 15:33:51 +0000 (08:33 -0700)
This was reverts commit 8009479ee919b9a91674f48050ccbff64eafedaa.

It was originally in x86/urgent, but was deemed wrong so got zapped.
But in the meantime, x86/urgent had been merged into x86/apic to
resolve a conflict.  I didn't notice the merge so didn't zap it
from x86/apic and it managed to make it up with the x86/apic
material.

The reverted commit is known to cause some KASAN problems.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
arch/x86/include/asm/nospec-branch.h

index ab19c7f1167badb1184e880097fa45c82b86b54f..2aa52cab1e463af6f4105e2f887acf185dec9f31 100644 (file)
  * Note: Only the memory operand variant of VERW clears the CPU buffers.
  */
 .macro CLEAR_CPU_BUFFERS
-       ALTERNATIVE "", __stringify(verw mds_verw_sel), X86_FEATURE_CLEAR_CPU_BUF
+       ALTERNATIVE "", __stringify(verw _ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF
 .endm
 
 #else /* __ASSEMBLY__ */