[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56B856F5.5080606@virtuozzo.com>
Date: Mon, 8 Feb 2016 11:51:01 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Yang Shi <yang.shi@...aro.org>, <Will.Deacon@....com>,
<Catalin.Marinas@....com>
CC: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linaro-kernel@...ts.linaro.org>
Subject: Re: [PATCH] arm64: disable kasan when accessing frame->fp in
unwind_frame
On 02/06/2016 02:04 AM, Yang Shi wrote:
>
> #include <asm/irq.h>
> #include <asm/stacktrace.h>
> @@ -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
>
Powered by blists - more mailing lists