diff options
Diffstat (limited to 'arch/powerpc/oprofile')
-rw-r--r-- | arch/powerpc/oprofile/backtrace.c | 11 | ||||
-rw-r--r-- | arch/powerpc/oprofile/op_model_7450.c | 2 | ||||
-rw-r--r-- | arch/powerpc/oprofile/op_model_fsl_booke.c | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/powerpc/oprofile/backtrace.c b/arch/powerpc/oprofile/backtrace.c index 75f57bc96b404..b4278cfd1f80c 100644 --- a/arch/powerpc/oprofile/backtrace.c +++ b/arch/powerpc/oprofile/backtrace.c @@ -11,6 +11,7 @@ #include <linux/sched.h> #include <asm/processor.h> #include <asm/uaccess.h> +#include <asm/compat.h> #define STACK_SP(STACK) *(STACK) @@ -26,8 +27,9 @@ static unsigned int user_getsp32(unsigned int sp, int is_first) { unsigned int stack_frame[2]; + void __user *p = compat_ptr(sp); - if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) + if (!access_ok(VERIFY_READ, p, sizeof(stack_frame))) return 0; /* @@ -35,8 +37,7 @@ static unsigned int user_getsp32(unsigned int sp, int is_first) * which means that we've done all that we can do from * interrupt context. */ - if (__copy_from_user_inatomic(stack_frame, (void *)(long)sp, - sizeof(stack_frame))) + if (__copy_from_user_inatomic(stack_frame, p, sizeof(stack_frame))) return 0; if (!is_first) @@ -54,10 +55,10 @@ static unsigned long user_getsp64(unsigned long sp, int is_first) { unsigned long stack_frame[3]; - if (!access_ok(VERIFY_READ, sp, sizeof(stack_frame))) + if (!access_ok(VERIFY_READ, (void __user *)sp, sizeof(stack_frame))) return 0; - if (__copy_from_user_inatomic(stack_frame, (void *)sp, + if (__copy_from_user_inatomic(stack_frame, (void __user *)sp, sizeof(stack_frame))) return 0; diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c index e0491c3c71f18..d8ee3aea83f89 100644 --- a/arch/powerpc/oprofile/op_model_7450.c +++ b/arch/powerpc/oprofile/op_model_7450.c @@ -1,5 +1,5 @@ /* - * oprofile/op_model_7450.c + * arch/powerpc/oprofile/op_model_7450.c * * Freescale 745x/744x oprofile support, based on fsl_booke support * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM diff --git a/arch/powerpc/oprofile/op_model_fsl_booke.c b/arch/powerpc/oprofile/op_model_fsl_booke.c index 93d63e62662f6..e29dede31423e 100644 --- a/arch/powerpc/oprofile/op_model_fsl_booke.c +++ b/arch/powerpc/oprofile/op_model_fsl_booke.c @@ -1,5 +1,5 @@ /* - * oprofile/op_model_e500.c + * arch/powerpc/oprofile/op_model_fsl_booke.c * * Freescale Book-E oprofile support, based on ppc64 oprofile support * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM |