2.6.3: ia64_abort(): Use guard page instead of page 0
PATCH 1/1 2.6.3: ia64_abort(): Use guard page instead of page 0
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.
include/asm-ia64/bug.h +1 -1
@@ -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)