Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-13 Thread Petr Mladek
On Thu 2017-10-12 11:11:00, Joe Perches wrote: > On Thu, 2017-10-12 at 14:08 +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > > > On Thu, Oct 12, 2017 at 12:03:04PM

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-13 Thread Petr Mladek
On Thu 2017-10-12 11:11:00, Joe Perches wrote: > On Thu, 2017-10-12 at 14:08 +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > > > On Thu, Oct 12, 2017 at 12:03:04PM

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Joe Perches
On Thu, 2017-10-12 at 14:08 +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > > > On Thu 2017-10-12

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Joe Perches
On Thu, 2017-10-12 at 14:08 +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > > > On Thu 2017-10-12

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Greg Kroah-Hartman
On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > > > Hi, > > > > > > > > I thought about

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Greg Kroah-Hartman
On Thu, Oct 12, 2017 at 01:52:29PM +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > > > Hi, > > > > > > > > I thought about

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Greg Kroah-Hartman
On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > > Hi, > > > > > > I thought about this a lot from several angles. And I would prefer > > > sligly different

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Greg Kroah-Hartman
On Thu, Oct 12, 2017 at 01:34:39PM +0200, Peter Zijlstra wrote: > On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > > Hi, > > > > > > I thought about this a lot from several angles. And I would prefer > > > sligly different

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Peter Zijlstra
On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > Hi, > > > > I thought about this a lot from several angles. And I would prefer > > sligly different placement, see the patch below. > > > > On Thu 2017-09-28 14:18:24, Peter Zijlstra

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Peter Zijlstra
On Thu, Oct 12, 2017 at 12:03:04PM +0200, Petr Mladek wrote: > On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > > Hi, > > > > I thought about this a lot from several angles. And I would prefer > > sligly different placement, see the patch below. > > > > On Thu 2017-09-28 14:18:24, Peter Zijlstra

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Peter Zijlstra
On Thu, Oct 12, 2017 at 11:45:37AM +0200, Petr Mladek wrote: > I think that it is safe after all, see the commit message in the patch > below. Its all up to Jason I suppose.

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Peter Zijlstra
On Thu, Oct 12, 2017 at 11:45:37AM +0200, Petr Mladek wrote: > I think that it is safe after all, see the commit message in the patch > below. Its all up to Jason I suppose.

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Petr Mladek
On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > Hi, > > I thought about this a lot from several angles. And I would prefer > sligly different placement, see the patch below. > > On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Petr Mladek
On Thu 2017-10-12 11:45:37, Petr Mladek wrote: > Hi, > > I thought about this a lot from several angles. And I would prefer > sligly different placement, see the patch below. > > On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Petr Mladek
ead.org> Date: Thu, 28 Sep 2017 14:18:24 +0200 Subject: [PATCH 1/3] printk: Fix kdb_trap_printk placement The counter kdb_trap_printk marks parts of code where we want to redirect printk() into vkdb_printf(). It is used to reuse existing non-trivial functions, for example, show_regs() to p

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-12 Thread Petr Mladek
p 2017 14:18:24 +0200 Subject: [PATCH 1/3] printk: Fix kdb_trap_printk placement The counter kdb_trap_printk marks parts of code where we want to redirect printk() into vkdb_printf(). It is used to reuse existing non-trivial functions, for example, show_regs() to print some information in

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-09 Thread Petr Mladek
On Thu 2017-10-05 15:42:27, Peter Zijlstra wrote: > On Thu, Oct 05, 2017 at 03:38:44PM +0200, Petr Mladek wrote: > > Or can the kdb console commands be called in NMI context? > > IIRC most of KDB runs from NMI context. To be honest, I am not familiar with kdb. I tried the following from

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-09 Thread Petr Mladek
On Thu 2017-10-05 15:42:27, Peter Zijlstra wrote: > On Thu, Oct 05, 2017 at 03:38:44PM +0200, Petr Mladek wrote: > > Or can the kdb console commands be called in NMI context? > > IIRC most of KDB runs from NMI context. To be honest, I am not familiar with kdb. I tried the following from

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-05 Thread Peter Zijlstra
On Thu, Oct 05, 2017 at 03:38:44PM +0200, Petr Mladek wrote: > Or can the kdb console commands be called in NMI context? IIRC most of KDB runs from NMI context.

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-05 Thread Peter Zijlstra
On Thu, Oct 05, 2017 at 03:38:44PM +0200, Petr Mladek wrote: > Or can the kdb console commands be called in NMI context? IIRC most of KDB runs from NMI context.

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-05 Thread Petr Mladek
On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? > > Cc: Jason Wessel >

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-05 Thread Petr Mladek
On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? > > Cc: Jason Wessel > Signed-off-by: Peter Zijlstra

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-03 Thread Steven Rostedt
On Thu, 28 Sep 2017 14:18:24 +0200 Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? I believe the

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-10-03 Thread Steven Rostedt
On Thu, 28 Sep 2017 14:18:24 +0200 Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? I believe the vprintk_nmi() just buffers the

[PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-09-28 Thread Peter Zijlstra
Some people figured vprintk_emit() makes for a nice API and exported it, bypassing the kdb trap. This still leaves vprintk_nmi() outside of the kbd reach, should that be fixed too? Cc: Jason Wessel Signed-off-by: Peter Zijlstra (Intel) ---

[PATCH 1/3] printk: Fix kdb_trap_printk placement

2017-09-28 Thread Peter Zijlstra
Some people figured vprintk_emit() makes for a nice API and exported it, bypassing the kdb trap. This still leaves vprintk_nmi() outside of the kbd reach, should that be fixed too? Cc: Jason Wessel Signed-off-by: Peter Zijlstra (Intel) --- kernel/printk/printk.c | 18 ++ 1

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-11-29 Thread Petr Mladek
2001 From: Peter Zijlstra <pet...@infradead.org> Date: Tue, 18 Oct 2016 19:08:31 +0200 Subject: [PATCH 1/3] printk: Fix kdb_trap_printk placement Some people figured vprintk_emit() makes for a nice API and exported it, bypassing the kdb trap. This still leaves vprintk_nmi() outside of the k

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-11-29 Thread Petr Mladek
return r; r is not defined. It is fixed in the next patch but it breaks bisectability. Please, find below an updated patch that also includes my Reviewed-by. >From 5adf18de45ba986ea3ae611446828238f4d65fe0 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 18 Oct 2016 19:08:31 +

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-20 Thread Sergey Senozhatsky
On (10/18/16 19:08), Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? > > Cc: Jason Wessel >

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-20 Thread Sergey Senozhatsky
On (10/18/16 19:08), Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? > > Cc: Jason Wessel > Signed-off-by: Peter Zijlstra

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-19 Thread Peter Zijlstra
On Wed, Oct 19, 2016 at 04:41:40PM +0200, Petr Mladek wrote: > On Tue 2016-10-18 19:08:31, Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and exported > > it, bypassing the kdb trap. > > > > This still leaves vprintk_nmi() outside of the kbd reach, should that >

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-19 Thread Peter Zijlstra
On Wed, Oct 19, 2016 at 04:41:40PM +0200, Petr Mladek wrote: > On Tue 2016-10-18 19:08:31, Peter Zijlstra wrote: > > Some people figured vprintk_emit() makes for a nice API and exported > > it, bypassing the kdb trap. > > > > This still leaves vprintk_nmi() outside of the kbd reach, should that >

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-19 Thread Petr Mladek
On Tue 2016-10-18 19:08:31, Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? Good question! vkdb_printf() tries to avoid a deadlock

Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-19 Thread Petr Mladek
On Tue 2016-10-18 19:08:31, Peter Zijlstra wrote: > Some people figured vprintk_emit() makes for a nice API and exported > it, bypassing the kdb trap. > > This still leaves vprintk_nmi() outside of the kbd reach, should that > be fixed too? Good question! vkdb_printf() tries to avoid a deadlock

[PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-18 Thread Peter Zijlstra
Some people figured vprintk_emit() makes for a nice API and exported it, bypassing the kdb trap. This still leaves vprintk_nmi() outside of the kbd reach, should that be fixed too? Cc: Jason Wessel Signed-off-by: Peter Zijlstra (Intel) ---

[PATCH 1/3] printk: Fix kdb_trap_printk placement

2016-10-18 Thread Peter Zijlstra
Some people figured vprintk_emit() makes for a nice API and exported it, bypassing the kdb trap. This still leaves vprintk_nmi() outside of the kbd reach, should that be fixed too? Cc: Jason Wessel Signed-off-by: Peter Zijlstra (Intel) --- kernel/printk/printk.c | 19 --- 1