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

David Mosberger
2004-02-19T01:14:59Z

>>>>> 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