mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fabbione@fabbione.net (Fabio Massimo Di Nitto)
To: linux-kernel@vger.kernel.org
Subject: [PATCH] x86_64: parse noexec=[on|off]
Date: Fri,  4 Feb 2005 10:32:14 +0100 (CET)	[thread overview]
Message-ID: <20050204093214.9DBB81EBF6@trider-g7.fabbione.net> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
  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.

Best Regards,
Fabio

diff -urNad linux-source-2.6.10-2.6.10/arch/x86_64/kernel/setup64.c /usr/src/dpatchtemp/dpep.fC5FuB/linux-source-2.6.10-2.6.10/arch/x86_64/kernel/setup64.c
- --- linux-source-2.6.10-2.6.10/arch/x86_64/kernel/setup64.c	2005-02-04 09:16:07.000000000 +0100
+++ /usr/src/dpatchtemp/dpep.fC5FuB/linux-source-2.6.10-2.6.10/arch/x86_64/kernel/setup64.c	2005-02-04 09:17:29.832897272 +0100
@@ -52,10 +52,10 @@
 */ 
 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;
         } 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCA0CVhCzbekR3nhgRAhwqAKCZTa/CefbSGX/1SsCzr3CJBf61gQCdGqac
lAVVeWjAxi+KZFiiu1Ukqkw=
=ARdl
-----END PGP SIGNATURE-----

             reply	other threads:[~2005-02-04  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-04  9:32 Fabio Massimo Di Nitto [this message]
2005-02-04 12:51 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050204093214.9DBB81EBF6@trider-g7.fabbione.net \
    --to=fabbione@fabbione.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®