[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240829230429.bksowrtyj7qqwtsh@desk>
Date: Thu, 29 Aug 2024 16:04:29 -0700
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Robert Gill <rtgill82@...il.com>,
Jari Ruusu <jariruusu@...tonmail.com>,
Brian Gerst <brgerst@...il.com>,
"Linux regression tracking (Thorsten Leemhuis)" <regressions@...mhuis.info>,
antonio.gomez.iglesias@...ux.intel.com,
daniel.sneddon@...ux.intel.com, stable@...r.kernel.org
Subject: Re: [PATCH v5] x86/entry_32: Use stack segment selector for VERW
operand
On Thu, Aug 29, 2024 at 03:28:13PM -0700, Dave Hansen wrote:
> 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.
That sounds good to me.
> 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:.
A quick test after adding %ss: on 64-bit doesn't show any significant
latency difference. I will revise the patch.
Powered by blists - more mailing lists