From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
Robert Gill <rtgill82@gmail.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
stable@vger.kernel.org, #@tip-bot2.tec.linutronix.de,
5.10+@tip-bot2.tec.linutronix.de,
Dave Hansen <dave.hansen@linux.intel.com>,
Brian Gerst <brgerst@gmail.com>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
x86@kernel.org
Subject: Re: [tip: x86/urgent] x86/bugs: Use code segment selector for VERW operand
Date: Wed, 9 Oct 2024 09:34:37 +0200 [thread overview]
Message-ID: <20241009073437.GG17263@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20241009061102.GBZwYediMceBEfSEFo@fat_crate.local>
On Wed, Oct 09, 2024 at 08:11:02AM +0200, Borislav Petkov wrote:
> On Tue, Oct 08, 2024 at 10:45:36PM -0000, tip-bot2 for Pawan Gupta wrote:
> > .macro CLEAR_CPU_BUFFERS
> > - ALTERNATIVE "", __stringify(verw _ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF
> > +#ifdef CONFIG_X86_64
> > + ALTERNATIVE "", "verw mds_verw_sel(%rip)", X86_FEATURE_CLEAR_CPU_BUF
> > +#else
> > + /*
> > + * In 32bit mode, the memory operand must be a %cs reference. The data
> > + * segments may not be usable (vm86 mode), and the stack segment may not
> > + * be flat (ESPFIX32).
> > + */
> > + ALTERNATIVE "", "verw %cs:mds_verw_sel", X86_FEATURE_CLEAR_CPU_BUF
> > +#endif
>
> So why didn't we ifdef the "verw mds_verw_sel(%rip)" and "verw
> %cs:mds_verw_sel" macro argument instead of adding more bigger ugly ifdeffery?
You need ifdeffery either way around, either directly like this or for
that macro. This is simple and straight forward.
next prev parent reply other threads:[~2024-10-09 7:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 22:45 [tip: x86/urgent] x86/bugs: Use code segment selector for VERW operand tip-bot2 for Pawan Gupta
2024-10-09 6:11 ` Borislav Petkov
2024-10-09 7:34 ` Peter Zijlstra [this message]
2024-10-09 9:32 ` Borislav Petkov
2024-10-09 10:24 ` Andrew Cooper
2024-10-09 13:42 ` Borislav Petkov
2024-10-09 15:00 ` Dave Hansen
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 7:52 tip-bot2 for Pawan Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241009073437.GG17263@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=#@tip-bot2.tec.linutronix.de \
--cc=5.10+@tip-bot2.tec.linutronix.de \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=rtgill82@gmail.com \
--cc=stable@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox