Re: Patch "module: Issue warnings when tainting kernel" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg,

I appreciate the notifications about patch moves. They make my life easier.
However, I don't understand how this change qualified for -stable. The issue
does not look serious enough to me to pass the criteria described in
Documentation/process/stable-kernel-rules.rst and I don't see which other patch
may require this one in v4.4.111.

What is the background for including this patch in -stable, please?

Libor

On Mon 08-01-18 13:52:57, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     module: Issue warnings when tainting kernel
> 
> to the 4.4-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      module-issue-warnings-when-tainting-kernel.patch
> and it can be found in the queue-4.4 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@xxxxxxxxxxxxxxx> know about it.
> 
> 
> From 3205c36cf7d96024626f92d65f560035df1abcb2 Mon Sep 17 00:00:00 2001
> From: Libor Pechacek <lpechacek@xxxxxxxx>
> Date: Wed, 13 Apr 2016 11:06:12 +0930
> Subject: module: Issue warnings when tainting kernel
> 
> From: Libor Pechacek <lpechacek@xxxxxxxx>
> 
> commit 3205c36cf7d96024626f92d65f560035df1abcb2 upstream.
> 
> While most of the locations where a kernel taint bit is set are accompanied
> with a warning message, there are two which set their bits silently.  If
> the tainting module gets unloaded later on, it is almost impossible to tell
> what was the reason for setting the flag.
> 
> Signed-off-by: Libor Pechacek <lpechacek@xxxxxxxx>
> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> 
> ---
>  kernel/module.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -2888,8 +2888,12 @@ static int check_modinfo(struct module *
>  		return -ENOEXEC;
>  	}
>  
> -	if (!get_modinfo(info, "intree"))
> +	if (!get_modinfo(info, "intree")) {
> +		if (!test_taint(TAINT_OOT_MODULE))
> +			pr_warn("%s: loading out-of-tree module taints kernel.\n",
> +				mod->name);
>  		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
> +	}
>  
>  	if (get_modinfo(info, "staging")) {
>  		add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK);
> @@ -3054,6 +3058,8 @@ static int move_module(struct module *mo
>  
>  static int check_module_license_and_versions(struct module *mod)
>  {
> +	int prev_taint = test_taint(TAINT_PROPRIETARY_MODULE);
> +
>  	/*
>  	 * ndiswrapper is under GPL by itself, but loads proprietary modules.
>  	 * Don't use add_taint_module(), as it would prevent ndiswrapper from
> @@ -3072,6 +3078,9 @@ static int check_module_license_and_vers
>  		add_taint_module(mod, TAINT_PROPRIETARY_MODULE,
>  				 LOCKDEP_NOW_UNRELIABLE);
>  
> +	if (!prev_taint && test_taint(TAINT_PROPRIETARY_MODULE))
> +		pr_warn("%s: module license taints kernel.\n", mod->name);
> +
>  #ifdef CONFIG_MODVERSIONS
>  	if ((mod->num_syms && !mod->crcs)
>  	    || (mod->num_gpl_syms && !mod->gpl_crcs)
> 
> 
> Patches currently in stable-queue which might be from lpechacek@xxxxxxxx are
> 
> queue-4.4/module-issue-warnings-when-tainting-kernel.patch
> 

-- 
Libor Pechacek
SUSE Labs



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]