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]
Message-ID: <20150220081003.GA20216@gmail.com>
Date:	Fri, 20 Feb 2015 09:10:03 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Adrien Schildknecht <adrien+dev@...ischi.me>
Cc:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	x86@...nel.org, rostedt@...dmis.org, heukelum@...tmail.fm,
	luto@...capital.net, adech.fo@...il.com,
	masami.hiramatsu.pt@...achi.com, akpm@...ux-foundation.org,
	a.ryabinin@...sung.com, fruggeri@...sta.com, bp@...en8.de,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] x86: fix output of show_stack_log_lvl()


* Adrien Schildknecht <adrien+dev@...ischi.me> wrote:

> show_stack_log_lvl() does not set the log level after a new line,
> the following messages printed with pr_cont are thus assigned to the
> default log level.
> This patch prepends the log level to the next message following a new
> line.
> 
> print_trace_address() uses printk(log_lvl). Using printk with just
> a log level is ignored and thus has no effect on the next pr_cont.
> We need to prepend the log level directly into the message.

This approach looks good to me, we want to print multi-line 
messages with the same consistent loglevel.

Totally unrelated observation:

> +++ b/arch/x86/kernel/dumpstack.c

>  	touch_nmi_watchdog();
> +	printk_stack_address(addr, reliable, data);

The whole code is sprinkled with touch_nmi_watchdog() 
calls. Shouldn't we simply make it a rule that if a printk 
message makes it to a real console (as opposed to the log 
buffer only), it should imply a touch_nmi_watchdog()?

Then all of those crappy touch_nmi_watchdog() calls could 
be removed here and in other places where long printk 
streams may happen.

Totally unrelated observation #2:

>  		if (kstack_end(stack))
>  			break;
> -		if (i && ((i % STACKSLOTS_PER_LINE) == 0))
> -			pr_cont("\n");

> +++ b/arch/x86/kernel/dumpstack_64.c

>  		if (((long) stack & (THREAD_SIZE-1)) == 0)
>  			break;
>  		}
> -		if (i && ((i % STACKSLOTS_PER_LINE) == 0))
> -			pr_cont("\n");

Looks like kstack_end() could be defined on 64-bit as well, 
unifying the stack printing logic some more?

( I'd no go so far as to unify the two functions, but the 
  closer to each other the better it is to make changes 
  that affect both of them. )

Thanks,

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