On 7/11/24 15:03, Pawan Gupta wrote: > +/* > + * Safer version of CLEAR_CPU_BUFFERS that uses %ss to reference VERW operand > + * mds_verw_sel. This ensures VERW will not #GP for an arbitrary user %ds. > + */ > +.macro CLEAR_CPU_BUFFERS_SAFE > + ALTERNATIVE "", __stringify(verw %ss:_ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF > +.endm One other thing... Instead of making a "_SAFE" variant, let's just make the 32-bit version always safe. Also, is there any downside to using %ss: on 64-bit? If not, let's just update the one and only CLEAR_CPU_BUFFERS use %ss:.