X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Fkernel%2Ftest_nx.c;h=787a5e499dd1d395dcfdc160e4c1682913cab5b9;hb=115399cab1a4a1f54580c4a8c6a24c6cede569b3;hp=6d7ef11e79757610caac0814e1a683c9558f4bd6;hpb=d145c7253c8cb2ed8a75a8839621b0bb8f778820;p=linux-2.6-omap-h63xx.git diff --git a/arch/x86/kernel/test_nx.c b/arch/x86/kernel/test_nx.c index 6d7ef11e797..787a5e499dd 100644 --- a/arch/x86/kernel/test_nx.c +++ b/arch/x86/kernel/test_nx.c @@ -11,7 +11,10 @@ */ #include #include +#include + #include +#include extern int rodata_test_data; @@ -89,11 +92,7 @@ static noinline int test_address(void *address) "2: mov %[zero], %[rslt]\n" " ret\n" ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 8\n" - " .quad 0b\n" - " .quad 2b\n" - ".previous\n" + _ASM_EXTABLE(0b,2b) : [rslt] "=r" (result) : [fake_code] "r" (address), [zero] "r" (0UL), "0" (result) ); @@ -142,7 +141,6 @@ static int test_NX(void) * Until then, don't run them to avoid too many people getting scared * by the error message */ -#if 0 #ifdef CONFIG_DEBUG_RODATA /* Test 3: Check if the .rodata section is executable */ @@ -155,6 +153,7 @@ static int test_NX(void) } #endif +#if 0 /* Test 4: Check if the .data section of a module is executable */ if (test_address(&test_data)) { printk(KERN_ERR "test_nx: .data section is executable\n");