[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1345759998.29170.20.camel@pasglop>
Date: Fri, 24 Aug 2012 08:13:18 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Andrea Arcangeli <aarcange@...hat.com>
Cc: Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Hillf Danton <dhillf@...il.com>, Dan Smith <danms@...ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Mike Galbraith <efault@....de>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Bharata B Rao <bharata.rao@...il.com>,
Lee Schermerhorn <Lee.Schermerhorn@...com>,
Rik van Riel <riel@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
Christoph Lameter <cl@...ux.com>,
Alex Shi <alex.shi@...el.com>,
Mauricio Faria de Oliveira <mauricfo@...ux.vnet.ibm.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Don Morris <don.morris@...com>,
Tony Breeds <tbreeds@....ibm.com>,
Kumar Gala <galak@...nel.crashing.org>
Subject: Re: [PATCH 33/36] autonuma: powerpc port
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists