lkml.org 
[lkml]   [2009]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86 entry_64.S lockdep fix

    On Fri, 17 Apr 2009, Mathieu Desnoyers wrote:
    >
    > I happened to have the following patch hanging around in my LTTng tree
    > for a while. Would it solve your problem by any chance ? I had to move
    > it a bit around in my patchset to put it before the nmi-safe int3
    > handler patch I have, but it should apply correctly.
    >
    >
    > x86 entry_64.S lockdep fix
    >
    > Add missing lockdep irq on instrumentation to entry_64.S.
    >
    > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
    > ---
    > arch/x86/kernel/entry_64.S | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > Index: linux-2.6-lttng/arch/x86/kernel/entry_64.S
    > ===================================================================
    > --- linux-2.6-lttng.orig/arch/x86/kernel/entry_64.S 2009-04-17 17:44:18.000000000 -0400
    > +++ linux-2.6-lttng/arch/x86/kernel/entry_64.S 2009-04-17 17:53:42.000000000 -0400
    > @@ -1420,9 +1420,9 @@ ENTRY(paranoid_exit)
    > testl $3,CS(%rsp)
    > jnz paranoid_userspace
    > paranoid_swapgs:
    > - TRACE_IRQS_IRETQ 0
    > SWAPGS_UNSAFE_STACK
    > paranoid_restore:
    > + TRACE_IRQS_IRETQ 0

    This is buggy. If you go here via userspace, you just did a swapgs, and
    the %gs register (process context) is now zero. If you call kernel code
    that does anything with "current" you will crash the system.

    -- Steve


    > RESTORE_ALL 8
    > jmp irq_return
    > paranoid_userspace:
    >
    > --
    > Mathieu Desnoyers
    > OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
    >


    \
     
     \ /
      Last update: 2009-04-18 15:57    [W:0.023 / U:34.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site