Re: [PATCH] 2.4.25: BUG(): Use guard page instead of page 0

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2004-02-19 12:14:59
>>>>> On Wed, 18 Feb 2004 14:13:03 -0800, Jason Uhlenkott <jasonuhl@sgi.com> said:

  Jason> The ia64 BUG macro deliberately writes to address 0 in order to
  Jason> trigger a page fault and an Oops.  This won't work if the process has
  Jason> mapped something into page zero:  We'll just print the "kernel BUG"
  Jason> message and continue (after having stomped on whatever user memory was
  Jason> at address 0).

  Jason> A solution is to write to the guard page in region 5, which is
  Jason> guaranteed to trigger a page fault.

The 2.6 kernel uses __builtin_trap(), which is even better (when available).

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Feb 18 22:50:58 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:22 EST