Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-18 Thread Joe Perches
On Tue, 2018-07-17 at 14:19 -0700, Joe Perches wrote: > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > [] > > @@ -93,26 +93,15 @@ static void printk_stack_address(unsigned long address, > > int reliable, > > */ > > void show_opcodes(u8 *rip, const char *loglvl) > > {

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-18 Thread Joe Perches
On Tue, 2018-07-17 at 14:19 -0700, Joe Perches wrote: > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > [] > > @@ -93,26 +93,15 @@ static void printk_stack_address(unsigned long address, > > int reliable, > > */ > > void show_opcodes(u8 *rip, const char *loglvl) > > {

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Joe Perches
On Wed, 2018-07-18 at 05:54 +0900, Tetsuo Handa wrote: > Corrected Signed-off-by: addresses. > > From 96d9d4d135994a081e54d33d23f5007c53d9b5dd Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Tue, 17 Jul 2018 22:47:11 +0900 > Subject: [PATCH v4] x86: Avoid pr_cont() in show_opcodes() > >

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Joe Perches
On Wed, 2018-07-18 at 05:54 +0900, Tetsuo Handa wrote: > Corrected Signed-off-by: addresses. > > From 96d9d4d135994a081e54d33d23f5007c53d9b5dd Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Tue, 17 Jul 2018 22:47:11 +0900 > Subject: [PATCH v4] x86: Avoid pr_cont() in show_opcodes() > >

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Andy Shevchenko
On Tue, Jul 17, 2018 at 12:01 PM, Rasmus Villemoes wrote: > + printk("%sCode: %*ph <%02x> %*ph\n", loglvl, Ah, I had looked at this code and thought about %ph, but didn't get through how to split it correctly. Thanks for the hint! P.S. I see the result, pretty nice and doesn't use

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Andy Shevchenko
On Tue, Jul 17, 2018 at 12:01 PM, Rasmus Villemoes wrote: > + printk("%sCode: %*ph <%02x> %*ph\n", loglvl, Ah, I had looked at this code and thought about %ph, but didn't get through how to split it correctly. Thanks for the hint! P.S. I see the result, pretty nice and doesn't use

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Tetsuo Handa
Corrected Signed-off-by: addresses. >From 96d9d4d135994a081e54d33d23f5007c53d9b5dd Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Tue, 17 Jul 2018 22:47:11 +0900 Subject: [PATCH v4] x86: Avoid pr_cont() in show_opcodes() Since syzbot is confused by concurrent printk() messages [1], this

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Tetsuo Handa
Corrected Signed-off-by: addresses. >From 96d9d4d135994a081e54d33d23f5007c53d9b5dd Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Tue, 17 Jul 2018 22:47:11 +0900 Subject: [PATCH v4] x86: Avoid pr_cont() in show_opcodes() Since syzbot is confused by concurrent printk() messages [1], this

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Rasmus Villemoes
On 2018-07-17 15:53, Tetsuo Handa wrote: > On 2018/07/17 18:01, Rasmus Villemoes wrote: >> Why not this instead? Less stack use, less code, no intermediary >> snprintfs, no pr_cont... > > Excellent! I didn't notice %ph extension. > >> Not compile-tested, probably whitespace-damaged, but you get

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Rasmus Villemoes
On 2018-07-17 15:53, Tetsuo Handa wrote: > On 2018/07/17 18:01, Rasmus Villemoes wrote: >> Why not this instead? Less stack use, less code, no intermediary >> snprintfs, no pr_cont... > > Excellent! I didn't notice %ph extension. > >> Not compile-tested, probably whitespace-damaged, but you get

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Tetsuo Handa
On 2018/07/17 18:01, Rasmus Villemoes wrote: > Why not this instead? Less stack use, less code, no intermediary > snprintfs, no pr_cont... Excellent! I didn't notice %ph extension. > Not compile-tested, probably whitespace-damaged, but you get the idea. Yes, it works well. >From

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Tetsuo Handa
On 2018/07/17 18:01, Rasmus Villemoes wrote: > Why not this instead? Less stack use, less code, no intermediary > snprintfs, no pr_cont... Excellent! I didn't notice %ph extension. > Not compile-tested, probably whitespace-damaged, but you get the idea. Yes, it works well. >From

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Rasmus Villemoes
On 2018-07-07 15:54, Tetsuo Handa wrote: > On 2018/07/07 20:12, Ingo Molnar wrote: >> >> * Tetsuo Handa wrote: >> >>> From: Tetsuo Handa >>> >>> Since syzbot is confused by concurrent printk() messages [1], >>> this patch changes show_opcodes() to use snprintf(). >>> >>> When we start adding

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-17 Thread Rasmus Villemoes
On 2018-07-07 15:54, Tetsuo Handa wrote: > On 2018/07/07 20:12, Ingo Molnar wrote: >> >> * Tetsuo Handa wrote: >> >>> From: Tetsuo Handa >>> >>> Since syzbot is confused by concurrent printk() messages [1], >>> this patch changes show_opcodes() to use snprintf(). >>> >>> When we start adding

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-16 Thread Tetsuo Handa
Ingo, is this patch acceptable? On 2018/07/07 22:54, Tetsuo Handa wrote: >From 61752cef56fad2a910f6bfd277e1b9b028aeab43 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Sat, 7 Jul 2018 22:45:30 +0900 > Subject: [PATCH v2] x86: Avoid pr_cont() in show_opcodes() > > Since syzbot is confused

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-16 Thread Tetsuo Handa
Ingo, is this patch acceptable? On 2018/07/07 22:54, Tetsuo Handa wrote: >From 61752cef56fad2a910f6bfd277e1b9b028aeab43 Mon Sep 17 00:00:00 2001 > From: Tetsuo Handa > Date: Sat, 7 Jul 2018 22:45:30 +0900 > Subject: [PATCH v2] x86: Avoid pr_cont() in show_opcodes() > > Since syzbot is confused

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread Tetsuo Handa
On 2018/07/11 1:51, David Laight wrote: > From: Josh Poimboeuf >> Sent: 09 July 2018 20:12 >> On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: >>> On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: >> Since syzbot is confused by concurrent printk() messages [1],

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread Tetsuo Handa
On 2018/07/11 1:51, David Laight wrote: > From: Josh Poimboeuf >> Sent: 09 July 2018 20:12 >> On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: >>> On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: >> Since syzbot is confused by concurrent printk() messages [1],

RE: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread David Laight
From: Josh Poimboeuf > Sent: 09 July 2018 20:12 > On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: > > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > > >> Since syzbot is confused by concurrent printk() messages [1], > > > >> this patch changes show_opcodes() to

RE: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread David Laight
From: Josh Poimboeuf > Sent: 09 July 2018 20:12 > On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: > > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > > >> Since syzbot is confused by concurrent printk() messages [1], > > > >> this patch changes show_opcodes() to

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread Tetsuo Handa
On 2018/07/10 4:11, Josh Poimboeuf wrote: > On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: >> On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > Since syzbot is confused by concurrent printk() messages [1], > this patch changes show_opcodes() to use

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-10 Thread Tetsuo Handa
On 2018/07/10 4:11, Josh Poimboeuf wrote: > On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: >> On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > Since syzbot is confused by concurrent printk() messages [1], > this patch changes show_opcodes() to use

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread Josh Poimboeuf
On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > >> Since syzbot is confused by concurrent printk() messages [1], > > >> this patch changes show_opcodes() to use snprintf(). > > But how big of a problem is that

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread Josh Poimboeuf
On Mon, Jul 09, 2018 at 10:49:53AM +0200, Peter Zijlstra wrote: > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > >> Since syzbot is confused by concurrent printk() messages [1], > > >> this patch changes show_opcodes() to use snprintf(). > > But how big of a problem is that

RE: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread David Laight
From: Peter Zijlstra > Sent: 09 July 2018 09:50 > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > >> Since syzbot is confused by concurrent printk() messages [1], > > >> this patch changes show_opcodes() to use snprintf(). snprintf() is probably the wrong function. You want the

RE: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread David Laight
From: Peter Zijlstra > Sent: 09 July 2018 09:50 > On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > > >> Since syzbot is confused by concurrent printk() messages [1], > > >> this patch changes show_opcodes() to use snprintf(). snprintf() is probably the wrong function. You want the

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread Peter Zijlstra
On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > >> Since syzbot is confused by concurrent printk() messages [1], > >> this patch changes show_opcodes() to use snprintf(). But how big of a problem is that really? We can't very well remove all pr_cont stuff from the kernel.

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-09 Thread Peter Zijlstra
On Sat, Jul 07, 2018 at 10:54:28PM +0900, Tetsuo Handa wrote: > >> Since syzbot is confused by concurrent printk() messages [1], > >> this patch changes show_opcodes() to use snprintf(). But how big of a problem is that really? We can't very well remove all pr_cont stuff from the kernel.

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-07 Thread Tetsuo Handa
On 2018/07/07 20:12, Ingo Molnar wrote: > > * Tetsuo Handa wrote: > >> From: Tetsuo Handa >> >> Since syzbot is confused by concurrent printk() messages [1], >> this patch changes show_opcodes() to use snprintf(). >> >> When we start adding prefix to each line of printk() output, >> we will be

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-07 Thread Tetsuo Handa
On 2018/07/07 20:12, Ingo Molnar wrote: > > * Tetsuo Handa wrote: > >> From: Tetsuo Handa >> >> Since syzbot is confused by concurrent printk() messages [1], >> this patch changes show_opcodes() to use snprintf(). >> >> When we start adding prefix to each line of printk() output, >> we will be

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-07 Thread Ingo Molnar
* Tetsuo Handa wrote: > From: Tetsuo Handa > > Since syzbot is confused by concurrent printk() messages [1], > this patch changes show_opcodes() to use snprintf(). > > When we start adding prefix to each line of printk() output, > we will be able to handle concurrent printk() messages. > >

Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()

2018-07-07 Thread Ingo Molnar
* Tetsuo Handa wrote: > From: Tetsuo Handa > > Since syzbot is confused by concurrent printk() messages [1], > this patch changes show_opcodes() to use snprintf(). > > When we start adding prefix to each line of printk() output, > we will be able to handle concurrent printk() messages. > >