Commit-ID:  91e08ab0c8515450258d7ad9033bfe69bebad25a
Gitweb:     http://git.kernel.org/tip/91e08ab0c8515450258d7ad9033bfe69bebad25a
Author:     Josh Poimboeuf <[email protected]>
AuthorDate: Thu, 17 Nov 2016 09:57:24 -0600
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 18 Nov 2016 09:38:00 +0100

x86/dumpstack: Prevent KASAN false positive warnings

The oops stack dump code scans the entire stack, which can cause KASAN
"stack-out-of-bounds" false positive warnings.  Tell KASAN to ignore it.

Signed-off-by: Josh Poimboeuf <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: 
http://lkml.kernel.org/r/5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoim...@redhat.com
Signed-off-by: Ingo Molnar <[email protected]>
---
 arch/x86/kernel/dumpstack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 9b7cf5c..85f854b 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -112,7 +112,7 @@ void show_trace_log_lvl(struct task_struct *task, struct 
pt_regs *regs,
                for (; stack < stack_info.end; stack++) {
                        unsigned long real_addr;
                        int reliable = 0;
-                       unsigned long addr = *stack;
+                       unsigned long addr = READ_ONCE_NOCHECK(*stack);
                        unsigned long *ret_addr_p =
                                unwind_get_return_address_ptr(&state);
 

Reply via email to