Re: raid6 badness

From: H. Peter Anvin
Date: Fri Jan 30 2004 - 21:14:24 EST


Followup to: <Pine.LNX.4.58.0401301158340.8900@xxxxxxxxxxxxxxxxxxxxx>
By author: "Michael V. David" <michael@xxxxxxxxxxx>
In newsgroup: linux.dev.kernel
>
> This x86_64 system has dual Opteron CPUs on a Tyan 2880 board. Kernel
> version string:
>
> Linux version 2.6.2-bk4 (michael@sapphire) (gcc version 3.3.2 20040119 (Red Hat Linux 3.3.2-8)) #3 SMP Fri Jan 30
> 08:56:11 EST 2004
>
> The same problem was produced with kernel versions 2.6.2-rc2 and
> 2.6.2-rc2-bk4. Output reproduced here is from -bk4.
>
> If raid6 is compiled into the kernel, the kernel panics while
> starting. In the present case, it was compiled as a module. On
> loading, there is a segfault, and syslog gets what follows:
>
> ---<snip>---
> raid6: int64x1 1175 MB/s
> raid6: int64x2 1734 MB/s
> raid6: int64x4 1773 MB/s
> raid6: int64x8 1273 MB/s
> general protection fault: 0000 [1]
> CPU 1
> Pid: 7310, comm: modprobe Not tainted
> RIP: 0010:[<ffffffffa0186383>] <ffffffffa0186383>{:raid6:raid6_sse21_gen_syndrome+51}
> RSP: 0018:0000010021825dd8 EFLAGS: 00010202
^

It crashes because the stack is misaligned. x86-64 requires that the
stack is always aligned to a 16-byte boundary, but your stack pointer
isn't.

The RAID-6 code for x86-64 specifically assumes proper stack
alignment, so a misaligned stack is fatal.

I don't know what would cause the stack to be misaligned, however.

-hpa
-
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/