diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2020-07-28 16:25:23 +0000 |
---|---|---|
committer | Guo Ren <guoren@linux.alibaba.com> | 2020-07-31 01:51:57 +0000 |
commit | a5447fb9b32eb33b2f0f09a63e4852b46af5b056 (patch) | |
tree | f0de95d035255dc8b0976765a0e4268e171d8ba0 /arch | |
parent | f788bb2fb915a79eae0a160580766ba52984d61f (diff) | |
download | linux-a5447fb9b32eb33b2f0f09a63e4852b46af5b056.tar.gz linux-a5447fb9b32eb33b2f0f09a63e4852b46af5b056.tar.bz2 linux-a5447fb9b32eb33b2f0f09a63e4852b46af5b056.zip |
csky: Fixup kprobes handler couldn't change pc
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@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/csky/abiv2/mcount.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/csky/abiv2/mcount.S b/arch/csky/abiv2/mcount.S index 911512bf480f..d745e10c10b0 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 |