From: Jason Uhlenkott <jasonuhl@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] 2.6.3: ia64_abort(): Use guard page instead of page 0
Date: Wed, 18 Feb 2004 22:13:32 +0000 [thread overview]
Message-ID: <20040218221332.GB87364@dragonfly.csd.sgi.com> (raw)
The ia64_abort() macro deliberately writes to address 0 in order to
trigger a page fault and an Oops. This won't work if the process has
mapped something into page zero: We'll just print the "kernel BUG"
message and continue (after having stomped on whatever user memory was
at address 0).
A solution is to write to the guard page in region 5, which is
guaranteed to trigger a page fault.
--- linux-2.6.3.orig/include/asm-ia64/bug.h Tue Feb 17 19:57:12 2004
+++ linux-2.6.3/include/asm-ia64/bug.h Wed Feb 18 14:00:14 2004
@@ -4,7 +4,7 @@
#if (__GNUC__ > 3) || (__GNUC__ = 3 && __GNUC_MINOR__ >= 1)
# define ia64_abort() __builtin_trap()
#else
-# define ia64_abort() (*(volatile int *) 0 = 0)
+# define ia64_abort() (*(volatile int *) (0xa000000000000000+2*PERCPU_PAGE_SIZE) = 0)
#endif
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0)
reply other threads:[~2004-02-18 22:13 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=20040218221332.GB87364@dragonfly.csd.sgi.com \
--to=jasonuhl@sgi.com \
--cc=linux-ia64@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