[PATCH] ppc32: Fix alignment exception checking on load/store multiple instructions

Kumar Gala kumar.gala at freescale.com
Wed Apr 20 00:50:05 EST 2005


Paul,

What is the state of ack'ing this patch?

- kumar

On Apr 12, 2005, at 1:03 AM, Kumar Gala wrote:

> Paulus,
>
> Can you take a look and ack this patch before I send to akpm.
>
> The handling of misaligned load/store multiplies did not check to see 
> if
> the address were ok to access before __{get,put}_user().
>
>
>
> Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
>
> ---
>  diff -Nru a/arch/ppc/kernel/align.c b/arch/ppc/kernel/align.c
> --- a/arch/ppc/kernel/align.c   2005-04-12 01:00:10 -05:00
>  +++ b/arch/ppc/kernel/align.c   2005-04-12 01:00:10 -05:00
>  @@ -290,6 +290,10 @@
>                          /* lwm, stmw */
>                          nb = (32 - reg) * 4;
>                  }
>  +
>  +               if (!access_ok((flags & ST? VERIFY_WRITE: 
> VERIFY_READ), addr, nb+nb0))
> +                       return -EFAULT; /* bad address */
> +
>                  rptr = (unsigned char *) &regs->gpr[reg];
>                  if (flags & LD) {
>                          for (i = 0; i < nb; ++i)
>  _______________________________________________
> Linuxppc-dev mailing list
>  Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev




More information about the Linuxppc-dev mailing list