
From: Fabio Massimo Di Nitto <fabbione@fabbione.net>

The patch fixes the noexec= boot option on x86_64 to actually work when
other options come after it.

Credits (if any ;)) should go to Matt Zimmerman and Colin Watson for
spotting the problem and providing/testing the fix.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/x86_64/kernel/setup64.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/x86_64/kernel/setup64.c~x86_64-parse-noexec= arch/x86_64/kernel/setup64.c
--- 25/arch/x86_64/kernel/setup64.c~x86_64-parse-noexec=	2005-02-04 02:29:45.890177144 -0800
+++ 25-akpm/arch/x86_64/kernel/setup64.c	2005-02-04 02:29:50.997400728 -0800
@@ -52,10 +52,10 @@ off	Disable
 */ 
 void __init nonx_setup(const char *str)
 {
-	if (!strcmp(str, "on")) {
+	if (!strncmp(str, "on", 2)) {
                 __supported_pte_mask |= _PAGE_NX; 
  		do_not_nx = 0; 
-	} else if (!strcmp(str, "off")) {
+	} else if (!strncmp(str, "off", 3)) {
 		do_not_nx = 1;
 		__supported_pte_mask &= ~_PAGE_NX;
         } 
_
