Messages in this thread | | | Subject | Re: [PATCH 33/36] autonuma: powerpc port | From | Benjamin Herrenschmidt <> | Date | Fri, 24 Aug 2012 08:13:18 +1000 |
| |
On Thu, 2012-08-23 at 15:11 +1000, Benjamin Herrenschmidt wrote:
> So we don't do protnone, and now that you mention it, I think that > means > that some of our embedded stuff is busted :-) > > Basically PROT_NONE turns into _PAGE_PRESENT without _PAGE_USER for > us.
.../...
> Looks like the SW TLB handlers used on embedded should also check > whether the address is a user or kernel address, and enforce > _PAGE_USER > in the former case. They might have done in the past, it's possible > that > it's code we lost, but as it is, it's broken. > > The case of HW loaded TLB embedded will need a different definition of > PAGE_NONE as well I suspect. Kumar, can you have a look ?
Ok, replying to myself... I wrote some of that stuff so I was all ready to put the brown paper bag on etc... but in fact:
- On Book3e.h, we have all 6 protection bits in the PTE (user R,W,X and supervisor R,W,X). _PAGE_BASE has none of them and _PAGE_USER brings both UR and SR. Since _PAGE_USER is not set for PROT_NONE we should be fine. That's the one I wrote so here goes the brown paper bag :-)
- 44x/47x is in trouble. _PAGE_USER is just a bit in the PTE that the TLB load handler uses to copy the S bits into the U bits. So we need to modify the code to also refuse to load a TLB entry with an EA below PAGE_OFFSET if _PAGE_USER isn't set. I'll give a try at a patch today if I get a chance, else it will have to wait til after I'm back from Plumbers.
- 8xx is probably in trouble, I don't know, I never touch that code, so somebody from FSL should have a look if they care.
- FSL BookE looks wrong after a quick look, I'll also let FSL take care of it.
Cheers, Ben.
| |