aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/kprobes.c')
-rw-r--r--arch/arm/kernel/kprobes.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index 1fb932b4fece..2ba7deb3072e 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -394,6 +394,14 @@ void __kprobes jprobe_return(void)
394 /* 394 /*
395 * Setup an empty pt_regs. Fill SP and PC fields as 395 * Setup an empty pt_regs. Fill SP and PC fields as
396 * they're needed by longjmp_break_handler. 396 * they're needed by longjmp_break_handler.
397 *
398 * We allocate some slack between the original SP and start of
399 * our fabricated regs. To be precise we want to have worst case
400 * covered which is STMFD with all 16 regs so we allocate 2 *
401 * sizeof(struct_pt_regs)).
402 *
403 * This is to prevent any simulated instruction from writing
404 * over the regs when they are accessing the stack.
397 */ 405 */
398 "sub sp, %0, %1 \n\t" 406 "sub sp, %0, %1 \n\t"
399 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" 407 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t"
@@ -411,7 +419,7 @@ void __kprobes jprobe_return(void)
411 "ldmia sp, {r0 - pc} \n\t" 419 "ldmia sp, {r0 - pc} \n\t"
412 : 420 :
413 : "r" (kcb->jprobe_saved_regs.ARM_sp), 421 : "r" (kcb->jprobe_saved_regs.ARM_sp),
414 "I" (sizeof(struct pt_regs)), 422 "I" (sizeof(struct pt_regs) * 2),
415 "J" (offsetof(struct pt_regs, ARM_sp)), 423 "J" (offsetof(struct pt_regs, ARM_sp)),
416 "J" (offsetof(struct pt_regs, ARM_pc)), 424 "J" (offsetof(struct pt_regs, ARM_pc)),
417 "J" (offsetof(struct pt_regs, ARM_cpsr)) 425 "J" (offsetof(struct pt_regs, ARM_cpsr))