From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756196AbcBINWP (ORCPT ); Tue, 9 Feb 2016 08:22:15 -0500 Received: from foss.arm.com ([217.140.101.70]:40268 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841AbcBINWO (ORCPT ); Tue, 9 Feb 2016 08:22:14 -0500 Date: Tue, 9 Feb 2016 13:22:15 +0000 From: Will Deacon To: Yang Shi Cc: aryabinin@virtuozzo.com, Catalin.Marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame Message-ID: <20160209132215.GL22874@arm.com> References: <1454951589-18238-1-git-send-email-yang.shi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454951589-18238-1-git-send-email-yang.shi@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2016 at 09:13:09AM -0800, Yang Shi wrote: > When boot arm64 kernel with KASAN enabled, the below error is reported by > kasan: > > BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr ffffffc064d57ba0 > Read of size 8 by task pidof/499 > page:ffffffbdc39355c0 count:0 mapcount:0 mapping: (null) index:0x0 > flags: 0x0() > page dumped because: kasan: bad access detected > CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119 > Hardware name: Freescale Layerscape 2085a RDB Board (DT) > Call trace: > [] dump_backtrace+0x0/0x290 > [] show_stack+0x24/0x30 > [] dump_stack+0x8c/0xd8 > [] kasan_report_error+0x558/0x588 > [] kasan_report+0x60/0x70 > [] __asan_load8+0x60/0x78 > [] unwind_frame+0xec/0x260 > [] get_wchan+0x110/0x160 > [] do_task_stat+0xb44/0xb68 > [] proc_tgid_stat+0x40/0x50 > [] proc_single_show+0x88/0xd8 > [] seq_read+0x370/0x770 > [] __vfs_read+0xc8/0x1d8 > [] vfs_read+0x94/0x168 > [] SyS_read+0xb8/0x128 > [] el0_svc_naked+0x24/0x28 > Memory state around the buggy address: > ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4 > ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > >ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ^ > ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ffffffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > Since the shadow byte pointed by the report is 0, so it may mean it is just hit > oob in non-current task. So, disable the instrumentation to silence these > warnings. > > Signed-off-by: Yang Shi Acked-by: Will Deacon Will