Re: [PATCH v4 0/3] x86/alternative: Patch a single alternative location only once

From: Juergen Gross

Date: Mon Dec 15 2025 - 03:25:16 EST


Ping?

On 19.11.25 17:04, Juergen Gross wrote:
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)

Juergen Gross (3):
x86/alternative: Drop not needed test after call of alt_replace_call()
x86/alternative: Use helper functions for patching alternatives
x86/alternative: Patch a single alternative location only once

arch/x86/kernel/alternative.c | 147 ++++++++++++++++++++--------------
1 file changed, 87 insertions(+), 60 deletions(-)


Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature