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: <20180319201723.GK4043@hirez.programming.kicks-ass.net>
Date:   Mon, 19 Mar 2018 21:17:23 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Joe Lawrence <joe.lawrence@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 1/2] sched/debug: fix per-task line continuation for
 console

On Mon, Mar 19, 2018 at 02:35:54PM -0400, Joe Lawrence wrote:
> When the SEQ_printf() macro prints to the console, it runs a simple
> printk() without KERN_CONT "continued" line printing.  The result of
> this is oddly wrapped task info, for example:
> 
>   % echo t > /proc/sysrq-trigger
>   % dmesg
>   ...
>   runnable tasks:
>   ...
>   [   29.608611]  I
>   [   29.608613]       rcu_sched     8      3252.013846      4087   120
>   [   29.608614]         0.000000        29.090111         0.000000
>   [   29.608615]  0 0
>   [   29.608616]  /
> 
> Modify SEQ_printf to use pr_cont() for expected one-line results:
> 
>   % echo t > /proc/sysrq-trigger
>   % dmesg
>   ...
>   runnable tasks:
>   ...
>   [  106.716329]  S        cpuhp/5    37      2006.315026        14   120         0.000000         0.496893         0.000000 0 0 /
> 
> Signed-off-by: Joe Lawrence <joe.lawrence@...hat.com>
> ---
>  kernel/sched/debug.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index 1ca0130ed4f9..50026aa2d81e 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -32,7 +32,7 @@
>  	if (m)					\
>  		seq_printf(m, x);		\
>  	else					\
> -		printk(x);			\
> +		pr_cont(x);			\

That used to work I think.. I think someone changed how printk() behaves
somewhere along the lines.

Does pr_cont("\n") DTRT? it seems like something weird.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ