On Mon, Aug 31, 2026 at 12:14:17PM +0100, Bradley Morgan wrote:
On 31 August 2026 12:07:50 BST, Greg Kroah-Hartman
[off-list ref] wrote:
quoted
On Mon, Aug 31, 2026 at 12:51:46PM +0200, Greg Kroah-Hartman wrote:
quoted
Other kernel code might want to call add_taint_module() so pull it out
and make it global. If modules are not enabled, this defaults to a call
to add_taint(), so all is fine.
Reviewed-by: Johan Hovold <johan@kernel.org>
Tested-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/module.h | 10 ++++++++++
kernel/module/main.c | 16 +++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 96cc98568eea..0636e0f2728c 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -29,6 +29,7 @@
#include <linux/srcu.h>
#include <linux/static_call_types.h>
#include <linux/dynamic_debug.h>
+#include <linux/panic.h>
#include <linux/percpu.h>
#include <asm/module.h>
@@ -770,6 +771,9 @@ static inline bool is_livepatch_module(struct module
*mod)
quoted
void module_for_each_mod(int(*func)(struct module *mod, void *data),
void *data);
quoted
+void add_taint_module(struct module *mod, unsigned flag,
+ enum lockdep_ok lockdep_ok);
+
#else /* !CONFIG_MODULES... */
static inline struct module *__module_address(unsigned long addr)
@@ -877,6 +881,12 @@ static inline bool module_is_coming(struct module
*mod)
quoted
static inline void module_for_each_mod(int(*func)(struct module *mod,
void *data), void *data)
quoted
{
}
+
+static inline void add_taint_module(struct module *mod, unsigned flag,
+ enum lockdep_ok, lockdep_ok)
And this line is wrong, ugh. I gotta go get sashiko running locally...
Cough cough, Claude code speaking
Nope, no claude running here at all, sorry to burst your bubble. If I
had, it would have caught this :)
greg k-h