[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] 2.4.0 i386 watchpoint problems

    On Fri, 22 Sep 2000, James Cownie wrote:
    > This is obviously much better (getting a signal for ALL debug register
    > triggers is a _good_ thing), but is it safe to call force_sig_info
    > from the debug trap handler if it was entered from kernel mode ?

    Good question.

    It should be safe. The code in ptrace.c already verifies that the debug
    registers are always in the user space area (see PTRACE_POKEUSR and the
    debug check for TASK_SIZE). That means that the debug trap should not
    happen for "any instruction" - only for instructions that access user

    And instructions that access user mode already have to be able to handle
    faults and paging, so they cannot happen during any locks held so there
    should be no deadlock issues with raising a signal.

    That said, it's a really good thing to think about, because it's
    fundamentally new behaviour. But I don't see anything wrong with it, and
    it's obviously the "RightThing(tm)" to do to make the breakpoints also
    notice when somebody uses a "read()" or similar to change the data.

    I forget all the reasons to get debug traps, so maybe I'm missing
    something. Does anybody see a problem that I missed?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.020 / U:10.520 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site