[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1596244453-98575-6-git-send-email-guoren@kernel.org>
Date: Sat, 1 Aug 2020 01:14:05 +0000
From: guoren@...nel.org
To: guoren@...nel.org, arnd@...db.de
Cc: linux-kernel@...r.kernel.org, linux-csky@...r.kernel.org,
linux-arch@...r.kernel.org, Guo Ren <guoren@...ux.alibaba.com>
Subject: [PATCH 05/13] csky: Fixup kprobes handler couldn't change pc
From: Guo Ren <guoren@...ux.alibaba.com>
The "Changing Execution Path" section in the Documentation/kprobes.txt
said:
Since kprobes can probe into a running kernel code, it can change the
register set, including instruction pointer.
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Cc: Arnd Bergmann <arnd@...db.de>
---
arch/csky/abiv2/mcount.S | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/csky/abiv2/mcount.S b/arch/csky/abiv2/mcount.S
index 911512b..d745e10 100644
--- a/arch/csky/abiv2/mcount.S
+++ b/arch/csky/abiv2/mcount.S
@@ -55,7 +55,9 @@
.macro mcount_exit_regs
RESTORE_REGS_FTRACE
- ldw t1, (sp, 0)
+ subi sp, 152
+ ldw t1, (sp, 4)
+ addi sp, 152
ldw r8, (sp, 4)
ldw lr, (sp, 8)
addi sp, 12
--
2.7.4
Powered by blists - more mailing lists