Re: Kernel Executable Pages

2008-07-15 Thread Asim
Thanks Peter for the great explanation! I'm working towards modifiying the kernel by adding a new layer so luckily I have the change_page_attr_set available to me. Thanks, Asim On 7/15/08, Peter Teoh <[EMAIL PROTECTED]> wrote: > This is a feature of the Intel CPU - called the NX bit. Once turn

Re: Kernel Executable Pages

2008-07-15 Thread Peter Teoh
This is a feature of the Intel CPU - called the NX bit. Once turned on, it is a hardware feature whereby u can specify whether the code is made executeable or not. As of 2nd edition of Understanding Linux Kernel, it is still mentioned that x86 cannot distinguished between executeable and non-ex

Re: Kernel Executable Pages

2008-07-15 Thread Asim
I'm allocation some function pointers and they were not executable. I wanted to make them executable. I was able to fix my problem. Let me know if there is any bug in what I did. my_array_of _fn_pointers = kmalloc(sizeof your_favourite_fn_ptr_struct_here, GFP_KERNEL); addr = my_array_of _fn_poin

Re: Kernel Executable Pages

2008-07-15 Thread Asim
The itf is actually addr variable . That was a typo while formatting code in the mail. Regards, Asim On 7/15/08, Asim <[EMAIL PROTECTED]> wrote: > I'm allocation some function pointers and they were not executable. I > wanted to make them executable. I was able to fix my problem. Let me > know if

Re: Kernel Executable Pages

2008-07-15 Thread Sandeep K Sinha
Can you be a bit more specific ? On Tue, Jul 15, 2008 at 9:55 PM, Asim <[EMAIL PROTECTED]> wrote: > Hi, > > I try to allocate memory to generate some executable code in memory. > But when i try to execute - I get the following error "kernel tried to > execute NX-protected page - exploit attempt? (

Kernel Executable Pages

2008-07-15 Thread Asim
Hi, I try to allocate memory to generate some executable code in memory. But when i try to execute - I get the following error "kernel tried to execute NX-protected page - exploit attempt? (uid: 0)". Is there some different way to allocate executable memory (and not data). Kindly help. Regards, A