Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753059AbcKRJHw (ORCPT ); Fri, 18 Nov 2016 04:07:52 -0500 Received: from terminus.zytor.com ([198.137.202.10]:51046 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbcKRJHd (ORCPT ); Fri, 18 Nov 2016 04:07:33 -0500 Date: Fri, 18 Nov 2016 01:04:54 -0800 From: tip-bot for Josh Poimboeuf Message-ID: Cc: eranian@gmail.com, bp@alien8.de, acme@kernel.org, peterz@infradead.org, dvlasenk@redhat.com, luto@kernel.org, brgerst@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, hpa@zytor.com, vincent.weaver@maine.edu, jpoimboe@redhat.com, mingo@kernel.org Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, vincent.weaver@maine.edu, mingo@kernel.org, jpoimboe@redhat.com, hpa@zytor.com, torvalds@linux-foundation.org, brgerst@gmail.com, luto@kernel.org, dvlasenk@redhat.com, acme@kernel.org, peterz@infradead.org, bp@alien8.de, eranian@gmail.com In-Reply-To: <5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com> References: <5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/dumpstack: Prevent KASAN false positive warnings Git-Commit-ID: 91e08ab0c8515450258d7ad9033bfe69bebad25a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1827 Lines: 45 Commit-ID: 91e08ab0c8515450258d7ad9033bfe69bebad25a Gitweb: http://git.kernel.org/tip/91e08ab0c8515450258d7ad9033bfe69bebad25a Author: Josh Poimboeuf AuthorDate: Thu, 17 Nov 2016 09:57:24 -0600 Committer: Ingo Molnar 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 Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: davej@codemonkey.org.uk Cc: dvyukov@google.com Link: http://lkml.kernel.org/r/5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- 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);