Re: PROBLEM: x86 alignment check bug

From: Alan Cox
Date: Wed Sep 08 2004 - 09:33:14 EST


On Mer, 2004-09-08 at 00:51, Zachary Amsden wrote:
> Exception reporting for alignment check violations on x86 is broken
> (unfortunately, rather badly, and rather hard to fix). Look at the trap
> function which fills in the si_addr field during an unaligned memory
> access, 2.6.8.1-mm4+, arch/i386/kernel/traps.c, Line 522:

So it fills in a value with random data that should be zero. Ok thats
hardly "badly".

> Clearly, this is not correct. Considering how difficult the fix is (the
> kernel must disassemble the faulting instruction and use register
> information to determine the faulting address)

It would be a nice extension although it would break other OS's if it
used %cr2 for this since they use it for thread id.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/