[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200522163504.GX317569@hirez.programming.kicks-ass.net>
Date: Fri, 22 May 2020 18:35:04 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: sumit.garg@...aro.org, jason.wessel@...driver.com,
dianders@...omium.org, kgdb-bugreport@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, patches@...aro.org, pmladek@...e.com,
sergey.senozhatsky@...il.com, Ingo Molnar <mingo@...hat.com>,
Will Deacon <will@...nel.org>
Subject: Re: [RFC PATCH 2/2] locking/spinlock/debug: Add checks for kgdb trap
safety
On Fri, May 22, 2020 at 03:55:10PM +0100, Daniel Thompson wrote:
> In general it is not safe to call spin_lock() whilst executing in the
> kgdb trap handler. The trap can be entered from all sorts of execution
> context (NMI, IRQ, irqs disabled, etc) and the kgdb/kdb needs to be
> as resillient as possible.
>
> Currently it is difficult to spot mistakes in the kgdb/kdb logic
> (especially so for kdb because it uses more kernel features than
> pure-kgdb). Let's provide a means to bring attention to deadlock
> risks in the debug code.
I really dislike this thing. Also, commit:
f6f48e180404 ("lockdep: Teach lockdep about "USED" <- "IN-NMI" inversions")
should be able to trigger here when the kgdb traps are marked as NMI.
x86 will soon have that.
Powered by blists - more mailing lists