From: Ingo Molnar <mingo@kernel.org>
To: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: x86@kernel.org, Josh Poimboeuf <jpoimboe@kernel.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86/speculation: Simplify and make CALL_NOSPEC consistent
Date: Fri, 28 Feb 2025 10:36:43 +0100 [thread overview]
Message-ID: <Z8GDqxTNN0rLBbrX@gmail.com> (raw)
In-Reply-To: <20250227-call-nospec-v2-1-895a30dceaac@linux.intel.com>
* Pawan Gupta <pawan.kumar.gupta@linux.intel.com> wrote:
> CALL_NOSPEC macro is used to generate Spectre-v2 mitigation friendly
> indirect branches. At compile time the macro defaults to indirect branch,
> and at runtime those can be patched to thunk based mitigations.
>
> This approach is opposite of what is done for the rest of the kernel, where
> the compile time default is to replace indirect calls with retpoline thunk
> calls.
>
> Make CALL_NOSPEC consistent with the rest of the kernel, default to
> retpoline thunk at compile time when CONFIG_MITIGATION_RETPOLINE is
> enabled.
>
> Also add the missing __CS_PREFIX to the CALL_NOSPEC macro to make it
> compatible with -mindirect-branch-cs-prefix.
The __CS_PREFIX change should probably be a separate patch.
Thanks,
Ingo
next prev parent reply other threads:[~2025-02-28 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 2:07 [PATCH v2] x86/speculation: Simplify and make CALL_NOSPEC consistent Pawan Gupta
2025-02-28 9:36 ` Ingo Molnar [this message]
2025-02-28 16:48 ` 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=Z8GDqxTNN0rLBbrX@gmail.com \
--to=mingo@kernel.org \
--cc=andrew.cooper3@citrix.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.