[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251013143444.3999-27-david.kaplan@amd.com>
Date: Mon, 13 Oct 2025 09:34:14 -0500
From: David Kaplan <david.kaplan@....com>
To: 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: [RFC PATCH 26/56] module: Save module ELF info
Re-patching of module alternatives at runtime requires saving the ELF
information about where those alternatives (and returns, retpolines, etc.)
exist. This information is already saved for livepatch modules, so save it
as well if we may be doing dynamic mitigation reconfiguration.
Signed-off-by: David Kaplan <david.kaplan@....com>
---
kernel/module/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index c66b26184936..088f9399af11 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -3491,7 +3491,7 @@ static int load_module(struct load_info *info, const char __user *uargs,
if (err < 0)
goto coming_cleanup;
- if (is_livepatch_module(mod)) {
+ if (IS_ENABLED(CONFIG_DYNAMIC_MITIGATIONS) || is_livepatch_module(mod)) {
err = copy_module_elf(mod, info);
if (err < 0)
goto sysfs_cleanup;
--
2.34.1
Powered by blists - more mailing lists