Re: [PATCH v2 1/2] module: pull out add_taint_module() to be public
From: Bradley Morgan <hidden>
Date: 2026-08-31 11:15:07
Also in:
driver-core, linux-doc, linux-trace-kernel, linux-usb, lkml
On 31 August 2026 12:07:50 BST, Greg Kroah-Hartman [off-list ref] wrote:
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
There will be a v3 in a few days. greg k-h
--- Thanks!https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@grrlz.net/ (local)