Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 10:51 -0800, Linus Torvalds wrote: > On Fri, Feb 20, 2015 at 10:03 AM, Joe Perchens wrote: > > > > True. Also fix the pr_debug/dev_dbg cases > > like drivers/dma/ppc4xx/adma.c: > > Yup, that's just garbage, and doesn't actually do what is intended. > > Also, rather than >

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Linus Torvalds
On Fri, Feb 20, 2015 at 10:03 AM, Joe Perches wrote: > > True. Also fix the pr_debug/dev_dbg cases > like drivers/dma/ppc4xx/adma.c: Yup, that's just garbage, and doesn't actually do what is intended. Also, rather than pr_debug("\n%s(%d):\nsrc: ", __func__, id); for (i = 0; i

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 09:52 -0800, Linus Torvalds wrote: > On Feb 20, 2015 9:40 AM, "Joe Perches" wrote: > > > > There are still a few dozen uses of this pattern: > > > > pr_info("Some message line 1\nNext line: "); > > for (...) > > pr_cont(" part %d", i); > >

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 12:05 -0500, Steven Rostedt wrote: > On Thu, 19 Feb 2015 21:13:29 -0800 > Linus Torvalds wrote: > > > On Feb 19, 2015 8:45 PM, "Steven Rostedt" wrote: > > > > > > This looks like a bug in printk(). Why doesn't pr_cont() continue? It > > > shouldn't care if there's a

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Borislav Petkov
On Fri, Feb 20, 2015 at 12:05:06PM -0500, Steven Rostedt wrote: > printk: Comment pr_cont() stating it is only to continue a line > > KERN_CONT is nicely commented in kern_levels.h, but pr_cont() is now > used more often, and it lacks the comment stating what it is used for. > It can be confused

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Steven Rostedt
On Thu, 19 Feb 2015 21:13:29 -0800 Linus Torvalds wrote: > On Feb 19, 2015 8:45 PM, "Steven Rostedt" wrote: > > > > This looks like a bug in printk(). Why doesn't pr_cont() continue? It > > shouldn't care if there's a newline or not. pr_cont() is supposed to > > continue whatever the last

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Adrien Schildknecht
> > 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. ) > > Adrien, want to

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Borislav Petkov
On Fri, Feb 20, 2015 at 09:10:03AM +0100, Ingo Molnar wrote: > This approach looks good to me, we want to print multi-line > messages with the same consistent loglevel. Right, I'll pick this one up for now as it is obviously correct and whatever we end up doing to pr_cont() won't influence it.

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Ingo Molnar
* Adrien Schildknecht 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()

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Borislav Petkov
On Fri, Feb 20, 2015 at 09:10:03AM +0100, Ingo Molnar wrote: This approach looks good to me, we want to print multi-line messages with the same consistent loglevel. Right, I'll pick this one up for now as it is obviously correct and whatever we end up doing to pr_cont() won't influence it.

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Ingo Molnar
* Adrien Schildknecht adrien+...@schischi.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.

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Adrien Schildknecht
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. ) Adrien, want to take care of

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Steven Rostedt
On Thu, 19 Feb 2015 21:13:29 -0800 Linus Torvalds torva...@linux-foundation.org wrote: On Feb 19, 2015 8:45 PM, Steven Rostedt rost...@goodmis.org wrote: This looks like a bug in printk(). Why doesn't pr_cont() continue? It shouldn't care if there's a newline or not. pr_cont() is supposed

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 12:05 -0500, Steven Rostedt wrote: On Thu, 19 Feb 2015 21:13:29 -0800 Linus Torvalds torva...@linux-foundation.org wrote: On Feb 19, 2015 8:45 PM, Steven Rostedt rost...@goodmis.org wrote: This looks like a bug in printk(). Why doesn't pr_cont() continue? It

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Borislav Petkov
On Fri, Feb 20, 2015 at 12:05:06PM -0500, Steven Rostedt wrote: printk: Comment pr_cont() stating it is only to continue a line KERN_CONT is nicely commented in kern_levels.h, but pr_cont() is now used more often, and it lacks the comment stating what it is used for. It can be confused as

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 09:52 -0800, Linus Torvalds wrote: On Feb 20, 2015 9:40 AM, Joe Perches j...@perches.com wrote: There are still a few dozen uses of this pattern: pr_info(Some message line 1\nNext line: ); for (...) pr_cont( part %d, i);

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Linus Torvalds
On Fri, Feb 20, 2015 at 10:03 AM, Joe Perches j...@perches.com wrote: True. Also fix the pr_debug/dev_dbg cases like drivers/dma/ppc4xx/adma.c: Yup, that's just garbage, and doesn't actually do what is intended. Also, rather than pr_debug(\n%s(%d):\nsrc: , __func__, id);

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 10:51 -0800, Linus Torvalds wrote: On Fri, Feb 20, 2015 at 10:03 AM, Joe Perchens j...@perches.com wrote: True. Also fix the pr_debug/dev_dbg cases like drivers/dma/ppc4xx/adma.c: Yup, that's just garbage, and doesn't actually do what is intended. Also, rather

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-19 Thread Steven Rostedt
On Fri, 20 Feb 2015 03:34:21 +0100 Adrien Schildknecht 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 looks like a bug in printk(). Why doesn't pr_cont() continue? It

[PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-19 Thread Adrien Schildknecht
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

Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-19 Thread Steven Rostedt
On Fri, 20 Feb 2015 03:34:21 +0100 Adrien Schildknecht adrien+...@schischi.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 looks like a bug in printk(). Why doesn't

[PATCH v2] x86: fix output of show_stack_log_lvl()

2015-02-19 Thread Adrien Schildknecht
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