[lkml]   [2008]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state changes
    On Saturday 09 August 2008, Herbert Xu wrote:
    > On Fri, Aug 08, 2008 at 04:11:21PM -0700, Suresh Siddha wrote:
    > >
    > > With out the recent dynamic fpu allocation changes, while we don't see
    > > there is a possible race still present in older kernels(for example,
    > > while kernel is using kernel_fpu_begin() in some optimized clear/copy
    > > page and an interrupt/softirq happens which uses these padlock
    > > instructions generating DNA fault).
    > No this wasn't a problem because kernel_fpu_begin clears TS and
    > therefore we don't get faults on SSE instructions.
    > However, with your patch it will become a problem due to the
    > fact that it wasn't designed to be nested.

    I don't exactly understand this. You think that


    is a problem and wasn't before?

    Say we have a software crypt-alg which uses optimized memcpy implemented with
    SSE instructions. These are protected with kernel_fpu_begin();

    So we have also code


    in crypto called under same circumstances.

    If XCRYPT may be interrupted and the interrupt code again uses this optimized
    memcpy implementation and so nesting kernel_fpu_begin then why should this
    not happen with the other alg.

    How could any kernel code use MMX/SSE/FPU when the interrupt case isn't

    Or is your argument that its lazy allocation itself is the problem: this
    nesting could always happen and was a bug but only with lazy allocation it is
    dangerous (as it may cause a spurious math fault in the race window).

    If this were right than any kernel code executing SSE may trigger now a oops
    in __switch_to() under some special circumstances.

    Wolfgang Walter
    Studentenwerk München
    Anstalt des öffentlichen Rechts
    Leiter EDV
    Leopoldstraße 15
    80802 München
    Tel: +49 89 38196-276
    Fax: +49 89 38196-144
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2008-08-09 17:59    [W:0.024 / U:16.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site