[lkml]   [2007]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: [patch 0/2] x86, ptrace: support for branch trace store(BTS)
    >There seems to be support for block stepping in arch/x86/kernel/step.c,
    >which is used by kernel/ptrace.c.
    >This is now another user for the DEBUGCTL MSR; the access needs to be
    >synchronized. I'll look into it.

    I looked into the new block/single stepping support in
    It uses a TIF DEBUGCTLMSR and a field unsigned long debugctlmsr in
    struct thread_struct.

    When they are done stepping, they clear the TIF and the MSR.

    Our patch uses a ds_area field in struct thread_struct and two TIF to
    the functionality, rather than the resource. We need to access the
    and DS_SAVE_AREA MSR's.

    I would rewrite our patch to rename the TIF to name the used resource
    move the code setting the DS_SAVE_AREA MSR to __switch_to_xtra; that
    only the code to take the timestamp in ptrace_bts.c.

    The two MSR accesses (or, rather, the two users of the TIF) still
    When either is done, he clears the TIF bit and thus disables the other

    I would introduce a convention:
    - each user clears only the debugctl bits he used
    - the TIF bit is cleared, if thread_struct.debugctlmsr == 0
    - before setting any bit, each user first checks all bits he intends to
    if any is set already, he bails out with an error

    Is there some better way to do this?

    thanks and regards,
    Intel GmbH
    Dornacher Strasse 1
    85622 Feldkirchen/Muenchen Germany
    Sitz der Gesellschaft: Feldkirchen bei Muenchen
    Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
    Registergericht: Muenchen HRB 47456 Ust.-IdNr.
    VAT Registration No.: DE129385895
    Citibank Frankfurt (BLZ 502 109 00) 600119052

    This e-mail and any attachments may contain confidential material for
    the sole use of the intended recipient(s). Any review or distribution
    by others is strictly prohibited. If you are not the intended
    recipient, please contact the sender and delete all copies.

     \ /
      Last update: 2007-12-03 16:21    [W:0.028 / U:0.872 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site