Commit 2093d532 authored by Fabio Massimo Di Nitto's avatar Fabio Massimo Di Nitto Committed by Linus Torvalds

[PATCH] x86_64: parse noexec=[on|off]

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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 99161612
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment