From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbcBHIuA (ORCPT ); Mon, 8 Feb 2016 03:50:00 -0500 Received: from mx2.parallels.com ([199.115.105.18]:43970 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbcBHIt7 (ORCPT ); Mon, 8 Feb 2016 03:49:59 -0500 Subject: Re: [PATCH] arm64: disable kasan when accessing frame->fp in unwind_frame To: Yang Shi , , References: <1454713487-5239-1-git-send-email-yang.shi@linaro.org> CC: , , From: Andrey Ryabinin Message-ID: <56B856F5.5080606@virtuozzo.com> Date: Mon, 8 Feb 2016 11:51:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1454713487-5239-1-git-send-email-yang.shi@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To US-EXCH.sw.swsoft.com (10.255.249.47) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/2016 02:04 AM, Yang Shi wrote: > > #include > #include > @@ -64,7 +65,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) > return -EINVAL; > > frame->sp = fp + 0x10; > + kasan_disable_current(); > frame->fp = *(unsigned long *)(fp); It would be better to use READ_ONCE_NOCHECK() here. See f7d27c35ddff7 ("x86/mm, kasan: Silence KASAN warnings in get_wchan()") which solves the same problem for x86. > + kasan_enable_current(); > frame->pc = *(unsigned long *)(fp + 8); Why you left frame->pc out of scope? This line could trigger kasan as well. > > #ifdef CONFIG_FUNCTION_GRAPH_TRACER >