You just triggered Intel's "Unsynchronised Cross-Modifying Code
Operations Can Cause Unexpected Instruction Execution Results"
Erratum, which affects _every_ multiprocessor Intel P6 box.
It's Pentium 3 Erratum E49 if you want to look it up; the other
Intel P6s have it too, but with different numbers.
In short, the only safe way to do this sort of thing is to force
all other processors to wait on a barrier first, then modify the
code, then release the barrier.
On a general note, I wish people would pay more attention to Intel's
and AMD's errata documents. There are a number of things documented
in Intel's IA32 manual set which simply do not work in the real world
due to errata. Unsync cross-modifying code is one, the PAT is another.
/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/