[PATCH 0/6] PowerPc 8xx TLB/MMU fixes
Joakim Tjernlund
joakim.tjernlund at transmode.se
Tue Oct 6 22:39:53 EST 2009
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote on 06/10/2009 13:06:26:
> From:
>
> Benjamin Herrenschmidt <benh at kernel.crashing.org>
>
> To:
>
> Joakim Tjernlund <joakim.tjernlund at transmode.se>
>
> Cc:
>
> "linuxppc-dev at ozlabs.org" <linuxppc-dev at ozlabs.org>, Rex Feany
> <RFeany at mrv.com>, Scott Wood <scottwood at freescale.com>
>
> Date:
>
> 06/10/2009 13:06
>
> Subject:
>
> Re: [PATCH 0/6] PowerPc 8xx TLB/MMU fixes
>
> On Tue, 2009-10-06 at 12:58 +0200, Joakim Tjernlund wrote:
>
> > Here I don't care if err. insn will be 0 if it fails and the following
> > if will be false
>
> I'd rather you use get_user() so it does access_ok().
It is only debug code so it will go away
The real access is later.
I need do kernel space separately, is there a better way than:
if (regs->nip & 0xc0000000) /* kernel space ? */
insn = *((unsigned long *)regs->nip);
else if (get_user(insn, (unsigned long *)regs->nip)) {
printk(KERN_CRIT "get_user! NIP:%lx\n", regs->nip); /* DEBUG */
goto bad_area_nosemaphore;
}
More information about the Linuxppc-dev
mailing list