Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote on 06/10/2009 13:06:26:
> From: > > Benjamin Herrenschmidt <b...@kernel.crashing.org> > > To: > > Joakim Tjernlund <joakim.tjernl...@transmode.se> > > Cc: > > "linuxppc-...@ozlabs.org" <linuxppc-...@ozlabs.org>, Rex Feany > <rfe...@mrv.com>, Scott Wood <scottw...@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; } _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev