Skip to content

Commit

Permalink
csky: Fixup kprobes handler couldn't change pc
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Arnd Bergmann <[email protected]>
  • Loading branch information
guoren83 committed Jul 31, 2020
1 parent f788bb2 commit a5447fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/csky/abiv2/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5447fb

Please sign in to comment.