lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 Nov 2013 20:54:17 +0100
From:	Andreas Herrmann <andreas.herrmann@...xeda.com>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Pekka Enberg <penberg@...nel.org>, Matt Mackall <mpm@...enic.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/slub: Switch slub_debug kernel option to early_param
 to avoid boot panic

On Wed, Nov 06, 2013 at 02:16:33PM -0500, Christoph Lameter wrote:
> On Wed, 6 Nov 2013, Andreas Herrmann wrote:
> 
> > When I've used slub_debug kernel option (e.g.
> > "slub_debug=,skbuff_fclone_cache" or similar) on a debug session I've
> > seen a panic like:
> 
> Hmmm.. That looks like its due to some slabs not having names
> during early boot. kmem_cache_flags is called with NULL as a parameter.

That's because the slub_debug parameter is not evaluated before
kmem_cache_flags is called.

Older kernels didn't show this problem. I think the sequence of those
calls has changed. Not sure what patch set has made that change.

> Are you sure that this fixes the issue? Looks like the
> kmem_cache_flag function should fail regardless of how early you set it.
> 
> AFAICT the right fix would be:

That would avoid the panic but I guess it won't enable slub debugging.

However I'll test this.


Andreas

> Subject: slub: Handle NULL parameter in kmem_cache_flags
> 
> kmem_cache_flags may be called with NULL parameter during early boot.
> Skip the test in that case.
> 
> Signed-off-by: Christoph Lameter <cl@...ux.com>
> 
> Index: linux/mm/slub.c
> ===================================================================
> --- linux.orig/mm/slub.c	2013-10-15 13:55:44.000000000 -0500
> +++ linux/mm/slub.c	2013-11-06 13:09:21.810583134 -0600
> @@ -1217,7 +1217,7 @@ static unsigned long kmem_cache_flags(un
>  	/*
>  	 * Enable debugging if selected on the kernel commandline.
>  	 */
> -	if (slub_debug && (!slub_debug_slabs ||
> +	if (slub_debug && name && (!slub_debug_slabs ||
>  		!strncmp(slub_debug_slabs, name, strlen(slub_debug_slabs))))
>  		flags |= slub_debug;
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ