arm64: Disable KASAN in uwwind_frame

There is chance of unwinding stack of other task
and that task may be executing on other CPU simultaneously.
If the other task which is getting unwind may be executing
on other cpu, KASAN warning would get printed due stack
changes. So disable kasan in unwind_frame while accessing
other stack frames.

Change-Id: I25107f44e102414cf36e50e0b215a207ae5462d1
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
Prasad Sodagudi 2017-02-24 09:00:53 -08:00
parent d72462d943
commit dde29fdd40

View file

@ -69,6 +69,8 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
frame->fp = *(unsigned long *)(fp); frame->fp = *(unsigned long *)(fp);
frame->pc = *(unsigned long *)(fp + 8); frame->pc = *(unsigned long *)(fp + 8);
kasan_enable_current();
#ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER
if (tsk && tsk->ret_stack && if (tsk && tsk->ret_stack &&
(frame->pc == (unsigned long)return_to_handler)) { (frame->pc == (unsigned long)return_to_handler)) {
@ -112,8 +114,6 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
} }
} }
kasan_enable_current();
return 0; return 0;
} }