Skip to contentSkip to conversation

how to disable the NX flag in a domU?

DISCUSSION Hans-Christian Armingeon 3 participants 5 messages Jun 28, 2006 – Jul 8, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I am having problems with an unclean written closed source application, which segfaults by time, because it has executable code on the stack.

Is it possible, to disable the NX bit on modern processors for a domU? I know, this is an unclean solution - but it would be a quick fix.

Many thanks in advance,

Johnny

#1 lore raw
Quoted 3 lines · Hans-Christian Armingeon

I am having problems with an unclean written closed source application, which segfaults by time, because it has executable code on the stack.

Is it possible, to disable the NX bit on modern processors for a domU? I know, this is an unclean solution - but it would be a quick fix.

You can specify 'noexec=off' to your domU Linux.

-- Keir

#4 lore raw
In reply to Hans-Christian Armingeon

Pass "noexec=off" to the kernel, and it won't set the NX bit in it's page-table entries, and I presume Xen will just use the same bits as the guest asks for... One would think, at least.. [I haven't tried this, I just scanned the kernel source code for the boot-line argument, as I knew there is some way to enable/disable it...]

Care to divulge what the app is so I can add it to the list of apps that I'm not going to use? ;-)

--
Mats

Quoted 28 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hans-Christian Armingeon
Sent: 28 June 2006 10:16
To: [email protected]
Subject: [Xen-devel] how to disable the NX flag in a domU?

Hi,

I am having problems with an unclean written closed source application, which segfaults by time, because it has executable code on the stack.

Is it possible, to disable the NX bit on modern processors for a domU? I know, this is an unclean solution - but it would be a quick fix.

Many thanks in advance,

Johnny

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to Keir Fraser

Hi,

Am Mittwoch, 28. Juni 2006 12:39 schrieb Keir Fraser:

Quoted 11 lines · Hans-Christian Armingeon
Quoted 7 lines

I am having problems with an unclean written closed source application, which segfaults by time, because it has executable code on the stack.

Is it possible, to disable the NX bit on modern processors for a domU? I know, this is an unclean solution - but it would be a quick fix.

You can specify 'noexec=off' to your domU Linux.

I have

extra = "noexec=off"

in my domU config, but I still get segfaults. I wrote a small program, that executes a printf on the stack, and it doesn't work. It works fine on x86 - it executes the printf on the stack.

Do I need to disable the nx flag globally on dom0?

Johnny

Quoted 9 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
In reply to Keir Fraser

Hi,

Am Mittwoch, 28. Juni 2006 12:39 schrieb Keir Fraser:

Quoted 11 lines · Hans-Christian Armingeon
Quoted 7 lines

I am having problems with an unclean written closed source application, which segfaults by time, because it has executable code on the stack.

Is it possible, to disable the NX bit on modern processors for a domU? I know, this is an unclean solution - but it would be a quick fix.

You can specify 'noexec=off' to your domU Linux.

I have

extra = "noexec=off"

in my domU config, but I still get segfaults. I wrote a small program, that executes a printf on the stack, and it doesn't work. It works fine on x86 - it executes the printf on the stack.

Do I need to disable the nx flag globally on dom0?

Johnny

Quoted 9 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel