Re: raid6 badness

From: H. Peter Anvin (hpa_at_zytor.com)
Date: 01/31/04

  • Next message: H. Peter Anvin: "Re: PATCH to access old-style FAT fs"
    To: linux-kernel@vger.kernel.org
    Date:	Sat, 31 Jan 2004 02:13:09 +0000 (UTC)
    
    

    Followup to: <Pine.LNX.4.58.0401301158340.8900@sapphire.newearth.org>
    By author: "Michael V. David" <michael@mvdavid.com>
    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: H. Peter Anvin: "Re: PATCH to access old-style FAT fs"

    Relevant Pages

    • [Full-disclosure] PHRACK 64: ATTACKING THE CORE
      ... - The Slab Allocator ... - Slab overflow exploiting: ... - Forcing a kernel path to sleep ... - Stack Frame Flow Recovery ...
      (Full-Disclosure)
    • Re: Interrupt context...
      ... > gone through most of the posts on interrupt in usenet. ... > kernel stack and ISR is executed. ... More may be saved depending on the architecture. ... Here the kernel have assembler code to save all general ...
      (comp.os.linux.development.system)
    • Re: 2.6.6-rc3-mm2 (4KSTACK)
      ... >>stack as a possible problem before looking at other things if I get bad ... but in a stable kernel series I ... bug" approach comes from a well-known software company, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Why is GForth-ITC fast?
      ... The kernel and the application code (so-called "userland") do not run ... That jump entails a "stack switch", ... the only thing is I guess if you want to do syscalls ...
      (comp.lang.forth)
    • Re: Kernel stack
      ... The problem is each process does not have a TSS of its own.Only one ... in another structure.A kernel stack of size 8k ... esp entry. ... This made me believe that the stack base is the ...
      (Linux-Kernel)