From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 0/3] x86/alternative: Make alternative patching more robust
Date: Mon, 29 Sep 2025 13:29:44 +0200 [thread overview]
Message-ID: <20250929112947.27267-1-jgross@suse.com> (raw)
This small series makes alternative patching a little bit more robust
for ALTERNATIVE_<n>() use cases by using a local buffer for merging
multiple patch actions of the same location.
With this series applied intermediate patch results due to multiple
features matching in a ALTERNATIVE_<n>() invocation won't be visible
to e.g. interrupt handlers being invoked between the single patching
operations.
Additionally any indirect call replacements with their direct call
equivalents no longer need to be placed carefully to be the first
executed patch action of an ALTERNATIVE_<n>() invocation, as the
needed reference of the indirect call of the original instruction
will still see the original code.
These patches have been sent before as part of my MSR paravirt rework
series. I'm sending them now as an independent series, as V2 of the
MSR series is no longer relying on them.
Juergen Gross (3):
x86/alternative: Drop not needed test after call of alt_replace_call()
x86/alternative: Refactor apply_alternatives()
x86/alternative: Patch a single alternative location only once
arch/x86/kernel/alternative.c | 86 ++++++++++++++++++++---------------
1 file changed, 49 insertions(+), 37 deletions(-)
--
2.51.0
next reply other threads:[~2025-09-29 11:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-29 11:29 Juergen Gross [this message]
2025-09-29 11:29 ` [PATCH 1/3] x86/alternative: Drop not needed test after call of alt_replace_call() Juergen Gross
2025-10-14 8:42 ` [tip: x86/core] " tip-bot2 for Juergen Gross
2025-09-29 11:29 ` [PATCH 2/3] x86/alternative: Refactor apply_alternatives() Juergen Gross
2025-10-14 8:42 ` [tip: x86/core] " tip-bot2 for Juergen Gross
2025-09-29 11:29 ` [PATCH 3/3] x86/alternative: Patch a single alternative location only once Juergen Gross
2025-09-30 7:26 ` Peter Zijlstra
2025-09-30 7:33 ` Jürgen Groß
2025-09-30 7:39 ` Peter Zijlstra
2025-09-30 8:04 ` Jürgen Groß
2025-10-14 8:42 ` [tip: x86/core] " tip-bot2 for Juergen Gross
2025-10-14 12:59 ` Borislav Petkov
2025-10-14 13:25 ` Borislav Petkov
2025-10-14 14:13 ` Jürgen Groß
2025-10-14 14:17 ` Borislav Petkov
2025-10-14 14:18 ` Peter Zijlstra
2025-10-14 14:26 ` Juergen Gross
2025-10-14 14:29 ` Borislav Petkov
2025-10-14 14:08 ` Jürgen Groß
2025-10-14 14:12 ` Borislav Petkov
2025-10-14 14:22 ` Jürgen Groß
2025-10-14 14:26 ` Borislav Petkov
2025-10-14 14:31 ` Jürgen Groß
2025-10-14 14:39 ` Borislav Petkov
2025-10-14 14:46 ` Jürgen Groß
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=20250929112947.27267-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®