Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-06-11 Thread Petr Mladek
On Wed 2020-06-10 17:41:40, Daniel Thompson wrote: > On Sat, May 16, 2020 at 01:36:38AM +0900, Sergey Senozhatsky wrote: > > On (20/05/15 17:32), Sumit Garg wrote: > > > > Can I please have some context what problem does this solve? > > > > > > You can find the problem description here [1] which l

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-06-11 Thread Sergey Senozhatsky
On (20/06/10 17:41), Daniel Thompson wrote: > > Thanks for the link. I'm slightly surprised it took so many years > > to notice the addition of printk_nmi/printk_safe :) > > Rather by coincidence (at least I think its a coincidence) the problem > has recently become much more obvious. > > 0d00449

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-06-10 Thread Daniel Thompson
On Sat, May 16, 2020 at 01:36:38AM +0900, Sergey Senozhatsky wrote: > On (20/05/15 17:32), Sumit Garg wrote: > > > Can I please have some context what problem does this solve? > > > > You can find the problem description here [1] which leads to this fix. > > [..] > > > [1] https://lkml.org/lkml/

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-20 Thread Daniel Thompson
On Wed, May 20, 2020 at 01:21:02PM +0900, Sergey Senozhatsky wrote: > On (20/05/18 11:21), Petr Mladek wrote: > [..] > > > > Is this guaranteed that we never execute this path from NMI? > > > > Good question! > > > > > Absolutely not. > > > > > > The execution context for kdb is pretty much uniq

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-19 Thread Sergey Senozhatsky
On (20/05/18 11:21), Petr Mladek wrote: [..] > > > Is this guaranteed that we never execute this path from NMI? > > Good question! > > > Absolutely not. > > > > The execution context for kdb is pretty much unique... we are running a > > debug mode with all CPUs parked in a holding loop with inte

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-18 Thread Petr Mladek
On Fri 2020-05-15 14:48:06, Daniel Thompson wrote: > On Fri, May 15, 2020 at 07:33:08PM +0900, Sergey Senozhatsky wrote: > > On (20/05/15 10:50), Petr Mladek wrote: > > > kdb is able to stop kernel even in NMI context where printk() is > > > redirected > > > to the printk_safe() lockless variant.

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-17 Thread Sumit Garg
On Fri, 15 May 2020 at 22:22, Doug Anderson wrote: > > Hi, > > On Fri, May 15, 2020 at 9:36 AM Sergey Senozhatsky > wrote: > > > > On (20/05/15 17:32), Sumit Garg wrote: > > > > Can I please have some context what problem does this solve? > > > > > > You can find the problem description here [1]

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Doug Anderson
Hi, On Fri, May 15, 2020 at 9:36 AM Sergey Senozhatsky wrote: > > On (20/05/15 17:32), Sumit Garg wrote: > > > Can I please have some context what problem does this solve? > > > > You can find the problem description here [1] which leads to this fix. > > [..] > > > [1] https://lkml.org/lkml/2020/

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Sergey Senozhatsky
On (20/05/15 17:32), Sumit Garg wrote: > > Can I please have some context what problem does this solve? > > You can find the problem description here [1] which leads to this fix. [..] > [1] https://lkml.org/lkml/2020/5/12/213 Thanks for the link. I'm slightly surprised it took so many years to

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Sergey Senozhatsky
On (20/05/15 14:48), Daniel Thompson wrote: > On Fri, May 15, 2020 at 07:33:08PM +0900, Sergey Senozhatsky wrote: > > On (20/05/15 10:50), Petr Mladek wrote: [..] > > Is this guaranteed that we never execute this path from NMI? > > Absolutely not. > > The execution context for kdb is pretty muc

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Daniel Thompson
On Fri, May 15, 2020 at 07:33:08PM +0900, Sergey Senozhatsky wrote: > On (20/05/15 10:50), Petr Mladek wrote: > > kdb is able to stop kernel even in NMI context where printk() is redirected > > to the printk_safe() lockless variant. Move the check and redirect to kdb > > even in this case. > > Can

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Sumit Garg
Hi Sergey, On Fri, 15 May 2020 at 16:03, Sergey Senozhatsky wrote: > > On (20/05/15 10:50), Petr Mladek wrote: > > kdb is able to stop kernel even in NMI context where printk() is redirected > > to the printk_safe() lockless variant. Move the check and redirect to kdb > > even in this case. > > C

Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Sergey Senozhatsky
On (20/05/15 10:50), Petr Mladek wrote: > kdb is able to stop kernel even in NMI context where printk() is redirected > to the printk_safe() lockless variant. Move the check and redirect to kdb > even in this case. Can I please have some context what problem does this solve? I can see that vkdb_pr

[PATCH] printk/kdb: Redirect printk messages into kdb in any context

2020-05-15 Thread Petr Mladek
kdb is able to stop kernel even in NMI context where printk() is redirected to the printk_safe() lockless variant. Move the check and redirect to kdb even in this case. Reported-by: Sumit Garg Tested-by: Sumit Garg Signed-off-by: Petr Mladek --- Sending as proper patch for review. Adding Sergey