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: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected
      ... stack usages for you is that they contain a 'cpumask_t' on the stack. ... We can enable MAXSMP and raise the CPU limits some time in the future. ... not accept a specially built kernel, but only a kernel that has been ... know how extensively these distributions test and certify for many known ...
      (Linux-Kernel)
    • 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: The Linux Staging tree, what it is and is not.
      ... if you compromize them and write the wrong ones to the stack, ... Load two user space fieldbus stacks on the same network card (remembering ... right, but that's the same, no matter if it runs in kernel or user ... need an objdict API to userspace...? ...
      (Linux-Kernel)
    • 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)