All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5 0/2] x86/alternative: Patch a single alternative location only once
Date: Mon,  5 Jan 2026 09:04:50 +0100	[thread overview]
Message-ID: <20260105080452.5064-1-jgross@suse.com> (raw)

Instead of patching a single location potentially multiple times in
case of nested ALTERNATIVE()s, do the patching only after having
evaluated all alt_instr instances for that location.

Changes in V2:
- complete rework (Boris Petkov)

Changes in V3:
- split former V2 patch into 2 by introducing a helper function (Boris Petkov)
- repost the small cleanup patch 1 which was taken before, but has somehow
  vanished from the tip x86/alternative branch (it is still in the tip
  master branch, but I couldn't find it in any other tip branch).

Changes in V4:
- use 3 helpers instead of 1 (Boris Petkov)

Changes in V5:
- dropped patch 1 of V4, as already applied
- small cosmetic changes (Boris Petkov)

Juergen Gross (2):
  x86/alternative: Use helper functions for patching alternatives
  x86/alternative: Patch a single alternative location only once

 arch/x86/kernel/alternative.c | 149 +++++++++++++++++++++-------------
 1 file changed, 92 insertions(+), 57 deletions(-)

-- 
2.51.0


             reply	other threads:[~2026-01-05  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05  8:04 Juergen Gross [this message]
2026-01-05  8:04 ` [PATCH v5 1/2] x86/alternative: Use helper functions for patching alternatives Juergen Gross
2026-01-08 19:18   ` [tip: x86/alternatives] " tip-bot2 for Juergen Gross
2026-01-05  8:04 ` [PATCH v5 2/2] x86/alternative: Patch a single alternative location only once Juergen Gross
2026-01-08 19:18   ` [tip: x86/alternatives] " tip-bot2 for Juergen Gross

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=20260105080452.5064-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 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.