DragonFly BSD
DragonFly kernel List (threaded) for 2012-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: AMD cpu bug update #3 -- Official AMD reference now available


From: Venkatesh Srinivas <vsrinivas@xxxxxxxxxx>
Date: Fri, 23 Mar 2012 20:39:28 -0400

Hi,

As a followup, here is our simplified test case:

ras.s ======================
.global ras
ras:
        movq $80, %r8
ras2:
        pushq %rax
        pushq %rcx
        pushq %rdx
        pushq %r9
        pushq %r10
        decq %r8
        jz ras3
        call ras2
ras3:
        popq %r10
        popq %r9
        popq %rdx
        popq %rcx
        popq %rax
        ret

main.c ======================
main(argc, argv)
        int argc;
        char *argv[];
{
	for(;;)
               ras();
}

compile main.c and ras.s  (gcc main.c ras.s) and run ./a.out; you may
quickly see %rsp updated incorrectly, which will likely manifest as a
segmentation fault. The fault is fairly sensitive to stack alignment,
so you may need to run it a few times to hit it; simply cancel the run
and try again.

This errata affects all AMD K10 CPUs; Families 10h and 12h. It does
not affect family 15h (Bulldozer).

There is a workaround -- setting bit 0 of MSR 0xc0011029. DragonFly
just got a patch to do so, expect other systems to follow suit soon.

Thanks!
-- vs;
http://ops101.org/4k/



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]