[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d897be07-ed59-4538-aceb-53c6512aeccf@suse.com>
Date: Wed, 15 Oct 2025 12:38:28 +0200
From: Juergen Gross <jgross@...e.com>
To: David Kaplan <david.kaplan@....com>, Thomas Gleixner
<tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>
Cc: Alexander Graf <graf@...zon.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 34/56] x86/alternative: Save old bytes for
alternatives
On 13.10.25 16:34, David Kaplan wrote:
> Save the existing instruction bytes at each alternative site when patching.
> This is only done the first time, and these will be used later to help
> restore the code back to its original form.
>
> Signed-off-by: David Kaplan <david.kaplan@....com>
Instead of saving the original instructions at runtime, why don't you
expand struct alt_instr to have an additional offset to a saved copy
of the original instruction, located in .altinstr_replacement?
The new field should be guarded with #ifdef CONFIG_DYNAMIC_MITIGATIONS,
of course, like the added handling in the ALTERNATIVE() macros.
Juergen
Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)
Powered by blists - more mailing lists