[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080131164412.GF25989@bingen.suse.de>
Date: Thu, 31 Jan 2008 17:44:12 +0100
From: Andi Kleen <ak@...e.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andi Kleen <ak@...e.de>, huang ying <huang.ying.caritas@...il.com>,
"Huang, Ying" <ying.huang@...el.com>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] x86: add executable mapping support to ioremap
On Thu, Jan 31, 2008 at 05:37:05PM +0100, Thomas Gleixner wrote:
> On Thu, 31 Jan 2008, Andi Kleen wrote:
>
> > > There is nothing to fix. It works on virtual addresses.
> > >
> > > The __pa() in change_page_attr_addr() is only used to check for the
> > > high alias mapping of the kernel, but the call to change_page_attr
> > > uses the virtual address.
> >
> > But __pa() doesn't work for ioremap ...
>
> If it does not, then __pa() needs to be fixed, nothing else.
No if, it doesn't.
Changing that seems like a slippery rope. Would you want to make it work for
user space addresses then too? It would certainly become
much more heavyweight because it requires much more checks
and then a page table lookup.
For a fairly uncommon case.
I always thought the cheap direct va<->pa conversions to be one of the basic
design principles of the Linux VM. It's surprising you want to throw
that overboard that quickly.
Better check at least with Linus first, it's a fairly fundamental change.
To be honest IMHO the simplest way to fix this problem would be to just put the
pgprot_t argument back into __ioremap(). Then you wouldn't have all
these problems.
-Andi
--
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