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 60c62c377fa..610e0f561c3 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -393,6 +393,14 @@ void __kprobes jprobe_return(void)
393 /* 393 /*
394 * Setup an empty pt_regs. Fill SP and PC fields as 394 * Setup an empty pt_regs. Fill SP and PC fields as
395 * they're needed by longjmp_break_handler. 395 * they're needed by longjmp_break_handler.
396 *
397 * We allocate some slack between the original SP and start of
398 * our fabricated regs. To be precise we want to have worst case
399 * covered which is STMFD with all 16 regs so we allocate 2 *
400 * sizeof(struct_pt_regs)).
401 *
402 * This is to prevent any simulated instruction from writing
403 * over the regs when they are accessing the stack.
396 */ 404 */
397 "sub sp, %0, %1 \n\t" 405 "sub sp, %0, %1 \n\t"
398 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" 406 "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t"
@@ -410,7 +418,7 @@ void __kprobes jprobe_return(void)
410 "ldmia sp, {r0 - pc} \n\t" 418 "ldmia sp, {r0 - pc} \n\t"
411 : 419 :
412 : "r" (kcb->jprobe_saved_regs.ARM_sp), 420 : "r" (kcb->jprobe_saved_regs.ARM_sp),
413 "I" (sizeof(struct pt_regs)), 421 "I" (sizeof(struct pt_regs) * 2),
414 "J" (offsetof(struct pt_regs, ARM_sp)), 422 "J" (offsetof(struct pt_regs, ARM_sp)),
415 "J" (offsetof(struct pt_regs, ARM_pc)), 423 "J" (offsetof(struct pt_regs, ARM_pc)),
416 "J" (offsetof(struct pt_regs, ARM_cpsr)) 424 "J" (offsetof(struct pt_regs, ARM_cpsr))