[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100219180332.GE4921@nowhere>
Date: Fri, 19 Feb 2010 19:03:34 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: "K.Prasad" <prasad@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Michael Stefaniuc <mstefani@...hat.com>,
Alan Stern <stern@...land.harvard.edu>,
Maneesh Soni <maneesh@...ux.vnet.ibm.com>,
Alexandre Julliard <julliard@...ehq.org>,
"Rafael J . Wysocki" <rjw@...k.pl>,
Maciej Rutecki <maciej.rutecki@...il.com>,
Roland McGrath <roland@...hat.com>
Subject: Re: [PATCH 2/2] hw-breakpoint: Keep track of dr7 local enable bits
On Fri, Feb 19, 2010 at 11:28:59PM +0530, K.Prasad wrote:
> On Fri, Feb 19, 2010 at 04:34:03PM +0100, Frederic Weisbecker wrote:
> > 2010/2/19 K.Prasad <prasad@...ux.vnet.ibm.com>:
> > > 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.
> >
> > Thanks.
>
> hmmh...I see...looks like I experienced single-bit ECC as I read
> the patch :-) Yes, let debugreg7 store values only when a valid bkpt
> request comes in.
Great :) I was feeling uncomfortable to push that out without
your ack. May I add it?
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists