[lkml]   [2010]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] hw-breakpoint: Keep track of dr7 local enable bits
2010/2/19 K.Prasad <>:
> So, the thread's copy of DR7 (in thread->ptrace_dr7) stores the
> requested data even if the 'write' onto DR7 i.e. ptrace_write_dr7()
> failed. This can be the other way round i.e. populate the thread's copy
> of DR7 only if the write was successful.

No. We store the new dr7 value only if ptrace_set_dr7() didn't fail.

> I think it will be in consonance with the v2.6.32 behaviour as well. For
> instance, in the code snippet from ptrace_set_debugreg() in v2.6.32
> below:
>                for (i = 0; i < 4; i++)
>                        if ((DR7_MASK >> ((data >> (16 + 4*i)) & 0xf)) & 1)
>                                return -EIO;
>                child->thread.debugreg7 = data;
> The thread's copy of DR7 is populated only if the incoming data is
> found to be valid.

This is also what does this patch. thread->ptrace_dr7 is only
changed if ptrace_set_dr7() succeeded.

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: 2010-02-19 16:37    [W:0.160 / U:4.492 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site