All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: x86@kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
	Vince Weaver <vincent.weaver@maine.edu>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	davej@codemonkey.org.uk, dvyukov@google.com,
	Stephane Eranian <eranian@gmail.com>
Subject: [PATCH 2/2] dumpstack: prevent KASAN false positive warnings
Date: Thu, 17 Nov 2016 09:57:24 -0600	[thread overview]
Message-ID: <5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <20161116130337.GT3142@twins.programming.kicks-ass.net>
In-Reply-To: <61939c0b2b2d63ce97ba59cba3b00fd47c2962cf.1479398226.git.jpoimboe@redhat.com>

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 <jpoimboe@redhat.com>
---
 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);
 
-- 
2.7.4

  reply	other threads:[~2016-11-17 17:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 17:43 perf: fuzzer KASAN unwind_get_return_address Vince Weaver
2016-11-15 18:57 ` Peter Zijlstra
2016-11-15 19:04   ` Dmitry Vyukov
2016-11-15 20:56     ` Josh Poimboeuf
2016-11-15 19:05   ` Vince Weaver
2016-11-15 20:57     ` Josh Poimboeuf
2016-11-16 13:03       ` Peter Zijlstra
2016-11-16 13:18         ` Dmitry Vyukov
2016-11-16 14:37         ` Josh Poimboeuf
2016-11-16 14:49           ` Peter Zijlstra
2016-11-16 14:58             ` Josh Poimboeuf
2016-11-16 14:58             ` Peter Zijlstra
2016-11-17  4:48               ` Josh Poimboeuf
2016-11-17  9:04                 ` Peter Zijlstra
2016-11-17  9:13                   ` Peter Zijlstra
2016-11-17  9:30                     ` Peter Zijlstra
2016-11-17  9:48                       ` Dmitry Vyukov
2016-11-17 14:01                         ` Josh Poimboeuf
2016-11-17 14:25                           ` Vince Weaver
2016-11-17 14:36                             ` Josh Poimboeuf
2016-11-17 14:58                               ` Dmitry Vyukov
2016-11-17 17:15                                 ` Vince Weaver
2016-11-17 15:18                   ` Josh Poimboeuf
2016-11-17 16:07                     ` Peter Zijlstra
2016-11-17 17:17                       ` Peter Zijlstra
2016-11-22 12:30                         ` [tip:perf/urgent] perf/x86/intel: Cure bogus unwind from PEBS entries tip-bot for Peter Zijlstra
2016-11-16 15:06             ` perf: fuzzer KASAN unwind_get_return_address Vince Weaver
2016-11-17 15:57         ` [PATCH 1/2] unwind: prevent KASAN false positive warnings in guess unwinder Josh Poimboeuf
2016-11-17 15:57           ` Josh Poimboeuf [this message]
2016-11-18  9:04             ` [tip:x86/urgent] x86/dumpstack: Prevent KASAN false positive warnings tip-bot for Josh Poimboeuf
2016-11-17 20:26           ` [PATCH 1/2] unwind: prevent KASAN false positive warnings in guess unwinder Josh Poimboeuf
2016-11-18  8:38             ` Ingo Molnar
2016-11-18  9:04           ` [tip:x86/urgent] x86/unwind: Prevent " tip-bot for Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f6e80c4b0c7f7f0b6211900847a247cdaad753c.1479398226.git.jpoimboe@redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=acme@kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=dvyukov@google.com \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vincent.weaver@maine.edu \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.