]> git.baikalelectronics.ru Git - kernel.git/commit
x86/debug: Allow a single level of #DB recursion
authorAndy Lutomirski <luto@kernel.org>
Wed, 2 Sep 2020 13:25:51 +0000 (15:25 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 4 Sep 2020 13:09:29 +0000 (15:09 +0200)
commitc4fe28c9de276ff50f986477d833dc7de7014055
tree1e470f1ce30ebd18f5175b586722e4cb18ca4ee0
parent8183a55d805152506b37160914de61a4209ea565
x86/debug: Allow a single level of #DB recursion

Trying to clear DR7 around a #DB from usermode malfunctions if the tasks
schedules when delivering SIGTRAP.

Rather than trying to define a special no-recursion region, just allow a
single level of recursion.  The same mechanism is used for NMI, and it
hasn't caused any problems yet.

Fixes: 7fe879960266 ("x86/db: Split out dr6/7 handling")
Reported-by: Kyle Huey <me@kylehuey.com>
Debugged-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/8b9bd05f187231df008d48cf818a6a311cbd5c98.1597882384.git.luto@kernel.org
Link: https://lore.kernel.org/r/20200902133200.726584153@infradead.org
arch/x86/kernel/traps.c