RE: [RFC PATCH 02/56] x86/Kconfig: Add CONFIG_DYNAMIC_MITIGATIONS

Kaplan, David
2025-10-17T13:57:09Z

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Josh Poimboeuf <jpoimboe@kernel.org>
> Sent: Thursday, October 16, 2025 4:20 PM
> To: Kaplan, David <David.Kaplan@amd.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>; Borislav Petkov <bp@alien8.de>; Peter
> Zijlstra <peterz@infradead.org>; Pawan Gupta
> <pawan.kumar.gupta@linux.intel.com>; Ingo Molnar <mingo@redhat.com>; Dave
> Hansen <dave.hansen@linux.intel.com>; x86@kernel.org; H . Peter Anvin
> <hpa@zytor.com>; Alexander Graf <graf@amazon.com>; Boris Ostrovsky
> <boris.ostrovsky@oracle.com>; linux-kernel@vger.kernel.org
> Subject: Re: [RFC PATCH 02/56] x86/Kconfig: Add
> CONFIG_DYNAMIC_MITIGATIONS
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Mon, Oct 13, 2025 at 09:33:50AM -0500, David Kaplan wrote:
> > CONFIG_DYNAMIC_MITIGATIONS enables support for runtime re-patching of the
> > kernel when mitigation selections are changed. It depends on
> > CONFIG_LIVEPATCH because it needs modules to preserve all their ELF
> > information for later re-patching. It also depends on CONFIG_FREEZER
> > because re-patching must be done while all tasks are in the freezer to
> > avoid race conditions.
>
> The LIVEPATCH dependency seems a bit arbitrary, can we have an
> underlying CONFIG_MODULE_PRESERVE_ELF, which LIVEPATCH and
> DYNAMIC_MITIGATIONS both select?
>

Ah, that's a good idea. I'll look into that.

Thanks
--David Kaplan