]> git.baikalelectronics.ru Git - kernel.git/commit
x86/unwind: Prevent false warnings for non-current tasks
authorJosh Poimboeuf <jpoimboe@redhat.com>
Sat, 25 Apr 2020 10:03:06 +0000 (05:03 -0500)
committerIngo Molnar <mingo@kernel.org>
Sat, 25 Apr 2020 10:22:28 +0000 (12:22 +0200)
commitc78c583f4b73b172aea8eeef449ba10aad508496
treea7c4976f966244d90218f97821eeb886676c398b
parent270cb4917c0a86f25daabc12d7c8520132008a95
x86/unwind: Prevent false warnings for non-current tasks

There's some daring kernel code out there which dumps the stack of
another task without first making sure the task is inactive.  If the
task happens to be running while the unwinder is reading the stack,
unusual unwinder warnings can result.

There's no race-free way for the unwinder to know whether such a warning
is legitimate, so just disable unwinder warnings for all non-current
tasks.

Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Jones <dsj@fb.com>
Cc: Jann Horn <jannh@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: https://lore.kernel.org/r/ec424a2aea1d461eb30cab48a28c6433de2ab784.1587808742.git.jpoimboe@redhat.com
arch/x86/kernel/dumpstack_64.c
arch/x86/kernel/unwind_frame.c
arch/x86/kernel/unwind_orc.c