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, 12 May 2010 16:39:07 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Anton Blanchard <anton@...ba.org>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	David Howells <dhowells@...hat.com>
Subject: Re: [PATCH] panic: Call console_verbose in panic

On Tue, 11 May 2010 08:59:59 +1000
Anton Blanchard <anton@...ba.org> wrote:

> 
> Most distros turn the console verbosity down and that means a backtrace after
> a panic never makes it to the console. I assume we haven't seen this because
> a panic is often preceeded by an oops which will have called console_verbose.
> There are however a lot of places we call panic directly, and they are
> broken.
> 
> Use console_verbose like we do in the oops path to ensure a directly called
> panic will print a backtrace.
> 
> Signed-off-by: Anton Blanchard <anton@...ba.org>
> ---
> 
> Index: linux-2.6/kernel/panic.c
> ===================================================================
> --- linux-2.6.orig/kernel/panic.c	2010-05-09 09:13:06.000000000 +1000
> +++ linux-2.6/kernel/panic.c	2010-05-09 09:14:13.000000000 +1000
> @@ -87,6 +87,7 @@ NORET_TYPE void panic(const char * fmt, 
>  	 */
>  	preempt_disable();
>  
> +	console_verbose();
>  	bust_spinlocks(1);
>  	va_start(args, fmt);
>  	vsnprintf(buf, sizeof(buf), fmt, args);

hm, console_verbose() is interesting:

: static inline void console_verbose(void)
: {
: 	if (console_loglevel)
: 		console_loglevel = 15;
: }

so if someone has run console_silent():

: static inline void console_silent(void)
: {
: 	console_loglevel = 0;
: }

then console_verbose() doesn't work.


The sole caller of console_silent() is
arch/mn10300/kernel/mn10300-watchdog.c:watchdog_interrupt(), which
makes me wonder if mn10300 is doing something wrong or outdated?

--
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