• F
    x86: Ignore trap bits on single step exceptions · 6c0aca28
    Frederic Weisbecker 提交于
    When a single step exception fires, the trap bits, used to
    signal hardware breakpoints, are in a random state.
    
    These trap bits might be set if another exception will follow,
    like a breakpoint in the next instruction, or a watchpoint in the
    previous one. Or there can be any junk there.
    
    So if we handle these trap bits during the single step exception,
    we are going to handle an exception twice, or we are going to
    handle junk.
    
    Just ignore them in this case.
    
    This fixes https://bugzilla.kernel.org/show_bug.cgi?id=21332Reported-by: NMichael Stefaniuc <mstefani@redhat.com>
    Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Rafael J. Wysocki <rjw@sisk.pl>
    Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
    Cc: Alexandre Julliard <julliard@winehq.org>
    Cc: Jason Wessel <jason.wessel@windriver.com>
    Cc: All since 2.6.33.x <stable@kernel.org>
    6c0aca28
hw_breakpoint.c 12.2 KB