* [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)
@ 2004-10-28 22:11 Petr Vandrovec
2004-10-29 9:03 ` Arjan van de Ven
2004-10-29 12:00 ` Christoph Hellwig
0 siblings, 2 replies; 5+ messages in thread
From: Petr Vandrovec @ 2004-10-28 22:11 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
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
expands to __PAGE_KERNEL_EXEC, and this one is not accessible to modules.
Or should I just use __pgprot(__PAGE_KERNEL & ~_PAGE_NX) or
__pgprot(_PAGE_KERNEL_EXEC) instead as pgprot argument to vmap?
Thanks,
Petr Vandrovec
--- linux/arch/i386/kernel/i386_ksyms.c 2004-10-27 22:55:58.000000000 +0200
+++ linux/arch/i386/kernel/i386_ksyms.c 2004-10-28 23:59:22.000000000 +0200
@@ -179,6 +179,7 @@
#endif
EXPORT_SYMBOL(__PAGE_KERNEL);
+EXPORT_SYMBOL(__PAGE_KERNEL_EXEC);
#ifdef CONFIG_HIGHMEM
EXPORT_SYMBOL(kmap);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)
2004-10-28 22:11 [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon) Petr Vandrovec
@ 2004-10-29 9:03 ` Arjan van de Ven
2004-10-29 11:38 ` Petr Vandrovec
2004-10-29 12:00 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2004-10-29 9:03 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: mingo, linux-kernel
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 ????
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)
2004-10-29 9:03 ` Arjan van de Ven
@ 2004-10-29 11:38 ` Petr Vandrovec
2004-10-29 11:42 ` Arjan van de Ven
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vandrovec @ 2004-10-29 11:38 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: mingo, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)
2004-10-29 11:38 ` Petr Vandrovec
@ 2004-10-29 11:42 ` Arjan van de Ven
0 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2004-10-29 11:42 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: mingo, linux-kernel
On Fri, 2004-10-29 at 13:38 +0200, Petr Vandrovec wrote:
> ????
>
> 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.
so effectively vmware has it's own module loader. quite interesting ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon)
2004-10-28 22:11 [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon) Petr Vandrovec
2004-10-29 9:03 ` Arjan van de Ven
@ 2004-10-29 12:00 ` Christoph Hellwig
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2004-10-29 12:00 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: mingo, linux-kernel
On Fri, Oct 29, 2004 at 12:11:48AM +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
> expands to __PAGE_KERNEL_EXEC, and this one is not accessible to modules.
The right thing is not to mark kernel virtual memory executable from
modules at all.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-29 12:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28 22:11 [PATCH[ Export __PAGE_KERNEL_EXEC for modules (vmmon) Petr Vandrovec
2004-10-29 9:03 ` Arjan van de Ven
2004-10-29 11:38 ` Petr Vandrovec
2004-10-29 11:42 ` Arjan van de Ven
2004-10-29 12:00 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®