Re: [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)

From: Petr Vandrovec
Date: Fri Oct 29 2004 - 06:51:19 EST


On Fri, Oct 29, 2004 at 11:03:41AM +0200, Arjan van de Ven wrote:
> On Fri, 2004-10-29 at 00:11 +0200, Petr Vandrovec wrote:
> > Hello Ingo,
> > recently support for NX on i386 arrived to 2.6.x kernel, and I have
> > some problems building code which uses vmap since then - PAGE_KERNEL_EXEC
>
> why are you vmap'ing *executable* kernel memory?
> That sounds very wrong.... very very wrong. The module loader needs it,
> sure, but that's not modular. What on earth are you doing ????

Due to rule that not everything should be in kernel, userspace
picks one of codes needed to switch processor from currently used
mode & address space to mode VMware needs (ia32 => long, long => ia32,
PAE <=> non-PAE + cr3 + gdt + idt) maps it into kernel space, and then run
it as needed. And for running it it must be executable.

OK, I think that I understand message. __pgprot(__PAGE_KERNEL & ~_PAGE_NX)
is my friend.
Petr Vandrovec

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/