Debugging cruft. Probably not really useful any more now that the segment limit hacks have been proven to work. --- execshield/arch/x86/kernel/traps.c~ 2009-03-11 15:00:41.000000000 -0400 +++ execshield/arch/x86/kernel/traps.c 2009-03-11 15:01:56.000000000 -0400 @@ -214,6 +214,16 @@ check_lazy_exec_limit(int cpu, struct pt * instruction. If the instruction still faults then * we won't hit this branch next time around. */ + if (print_fatal_signals >= 2) { + printk(KERN_ERR "#GPF fixup (%ld[seg:%lx]) at %08lx," + "CPU#%d.\n", + error_code, error_code/8, regs->ip, + smp_processor_id()); + printk(KERN_ERR "exec_limit: %08lx, " + "user_cs: %08x/%08x, CPU_cs: %08x/%08x.\n", + current->mm->context.exec_limit, + desc1->a, desc1->b, desc2->a, desc2->b); + } load_user_cs_desc(cpu, current->mm); return 1; @@ -405,6 +405,15 @@ do_general_protection(struct pt_regs *re if (ok) return; + if (print_fatal_signals) { + printk(KERN_ERR "#GPF(%ld[seg:%lx]) at %08lx, CPU#%d.\n", + error_code, error_code/8, regs->ip, + smp_processor_id()); + printk(KERN_ERR "exec_limit: %08lx, user_cs: %08x/%08x.\n", + current->mm->context.exec_limit, + current->mm->context.user_cs.a, + current->mm->context.user_cs.b); + } } #endif --- execshield/include/linux/sched.h~ 2009-03-11 15:04:07.000000000 -0400 +++ execshield/include/linux/sched.h 2009-03-11 15:04:27.000000000 -0400 @@ -99,5 +99,6 @@ struct bio; struct bts_tracer; +extern int print_fatal_signals; /* * List of flags we want to share for kernel threads,