Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19e617aa authored by Prateek Sood's avatar Prateek Sood Committed by Gerrit - the friendly Code Review server
Browse files

kasan: disable kasan during unwind_frame()



Disable kasan during unwind_frame() as current version
of LLVM is not supporting following compiler attribute:
__attribute__((no_sanitize("address"))).

Change-Id: I600efd6c68efc3dbf4f6ed2acbd320f8c6038b69
Signed-off-by: default avatarPrateek Sood <prsood@codeaurora.org>
parent c31a9282
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/sched/debug.h>
#include <linux/sched/task_stack.h>
#include <linux/stacktrace.h>
#include <linux/kasan.h>

#include <asm/irq.h>
#include <asm/stack_pointer.h>
@@ -53,8 +54,10 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
	if (!on_accessible_stack(tsk, fp))
		return -EINVAL;

	kasan_disable_current();
	frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
	frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8));
	kasan_enable_current();

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
	if (tsk->ret_stack &&