From: Jakub Bogusz <qboosh@pld-linux.org>
To: Miloslav Trmac <mitr@volny.cz>, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix NX-related Oops in wistron_btns module
Date: Sat, 16 Nov 2013 21:20:48 +0100 [thread overview]
Message-ID: <20131116202048.GA8688@stranger.qboosh.pl> (raw)
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
The attached patch fixes "kernel tried to execute NX-protected page"
Oops when loading wistron_btns module, occurring since at least 3.4.x;
still applies to Linux 3.12.
--
Jakub Bogusz http://qboosh.pl/
[-- Attachment #2: linux-wistron-nx.patch --]
[-- Type: text/plain, Size: 1173 bytes --]
This patch fixes "kernel tried to execute NX-protected page" oops when
loading winstron-btns module.
Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>
--- linux-3.10/drivers/input/misc/wistron_btns.c.orig 2013-11-16 09:05:55.612742472 +0100
+++ linux-3.10/drivers/input/misc/wistron_btns.c 2013-11-16 09:24:37.356028732 +0100
@@ -33,6 +33,7 @@
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
+#include <asm/cacheflush.h>
/* How often we poll keys - msecs */
#define POLL_INTERVAL_DEFAULT 500 /* when idle */
@@ -124,6 +125,7 @@
if (entry_point >= 0xF0000) {
bios_code_map_base = base;
bios_entry_point = bios_code_map_base + (entry_point & 0xFFFF);
+ set_memory_x((unsigned long)bios_code_map_base, 0x10000 >> PAGE_SHIFT);
} else {
iounmap(base);
bios_code_map_base = ioremap(entry_point & ~0x3FFF, 0x4000);
@@ -134,6 +136,7 @@
goto err;
}
bios_entry_point = bios_code_map_base + (entry_point & 0x3FFF);
+ set_memory_x((unsigned long)bios_code_map_base, 0x4000 >> PAGE_SHIFT);
}
/* The Windows driver maps 0x10000 bytes, we keep only one page... */
bios_data_map_base = ioremap(0x400, 0xc00);
reply other threads:[~2013-11-16 20:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131116202048.GA8688@stranger.qboosh.pl \
--to=qboosh@pld-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitr@volny.cz \
/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®