diff options
author | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
commit | 336f5899d287f06d8329e208fc14ce50f7ec9698 (patch) | |
tree | 9b762d450d5eb248a6ff8317badb7e223d93ed58 /arch/arm/kernel | |
parent | a4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff) | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) |
Merge branch 'master' into export-slabh
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/kprobes.c | 10 |
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)) |