From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030499AbcBSRiQ (ORCPT ); Fri, 19 Feb 2016 12:38:16 -0500 Received: from smtprelay0160.hostedemail.com ([216.40.44.160]:33375 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030364AbcBSRiN (ORCPT ); Fri, 19 Feb 2016 12:38:13 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:2196:2199:2393:2553:2559:2562:2901:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:4250:4321:4385:4605:5007:6119:6261:7875:7903:8603:8660:9040:9163:9165:10004:10400:10848:10967:11026:11232:11658:11914:12043:12295:12438:12517:12519:12555:12740:13148:13230:14096:14097:14659:21060:21080:30003:30029:30045:30054:30056:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: end22_479a312288c31 X-Filterd-Recvd-Size: 3080 Date: Fri, 19 Feb 2016 12:38:10 -0500 From: Steven Rostedt To: Yang Shi Cc: aryabinin@virtuozzo.com, mingo@redhat.com, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org Subject: Re: [v2 PATCH] trace, kasan: silence Kasan warning in check_stack Message-ID: <20160219123810.4c5e152c@gandalf.local.home> In-Reply-To: <1455309960-18930-1-git-send-email-yang.shi@linaro.org> References: <1455309960-18930-1-git-send-email-yang.shi@linaro.org> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 Feb 2016 12:46:00 -0800 Yang Shi wrote: > When enabling stack trace via "echo 1 > /proc/sys/kernel/stack_tracer_enabled", > the below KASAN warning is triggered: > > BUG: KASAN: stack-out-of-bounds in check_stack+0x344/0x848 at addr ffffffc0689ebab8 > Read of size 8 by task ksoftirqd/4/29 > page:ffffffbdc3a27ac0 count:0 mapcount:0 mapping: (null) index:0x0 > flags: 0x0() > page dumped because: kasan: bad access detected > CPU: 4 PID: 29 Comm: ksoftirqd/4 Not tainted 4.5.0-rc1 #129 > Hardware name: Freescale Layerscape 2085a RDB Board (DT) > Call trace: > [] dump_backtrace+0x0/0x3a0 > [] show_stack+0x24/0x30 > [] dump_stack+0xd8/0x168 > [] kasan_report_error+0x6a0/0x920 > [] kasan_report+0x70/0xb8 > [] __asan_load8+0x60/0x78 > [] check_stack+0x344/0x848 > [] stack_trace_call+0x1c4/0x370 > [] ftrace_ops_no_ops+0x2c0/0x590 > [] ftrace_graph_call+0x0/0x14 > [] fpsimd_thread_switch+0x24/0x1e8 > [] __switch_to+0x34/0x218 > [] __schedule+0x3ac/0x15b8 > [] schedule+0x5c/0x178 > [] smpboot_thread_fn+0x350/0x960 > [] kthread+0x1d8/0x2b0 > [] ret_from_fork+0x10/0x40 > Memory state around the buggy address: > ffffffc0689eb980: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f4 f4 f4 > ffffffc0689eba00: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 > >ffffffc0689eba80: 00 00 f1 f1 f1 f1 00 f4 f4 f4 f3 f3 f3 f3 00 00 > ^ > ffffffc0689ebb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ffffffc0689ebb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > The stacker tracer traverses the whole kernel stack when saving the max stack > trace. It may touch the stack red zones to cause the warning. So, just disable > the instrumentation to silence the warning. > > Signed-off-by: Yang Shi Applied, thanks! -- Steve