[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1264600792.31321.464.camel@gandalf.stny.rr.com>
Date: Wed, 27 Jan 2010 08:59:52 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Tom Tromey <tromey@...hat.com>,
Kyle Moffett <kyle@...fetthome.net>,
"Frank Ch. Eigler" <fche@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Fr??d??ric Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-next@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>,
utrace-devel@...hat.com, Thomas Gleixner <tglx@...utronix.de>,
JimKeniston <jkenisto@...ibm.com>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: linux-next: add utrace tree
[ Added Arjan ]
On Wed, 2010-01-27 at 02:43 -0800, Linus Torvalds wrote:
>
> On Wed, 27 Jan 2010, Peter Zijlstra wrote:
> >
> > Right, so you're going to love uprobes, which does exactly that. The
> > current proposal is overwriting the target instruction with an INT3 and
> > injecting an extra vma into the target process's address space
> > containing the original instruction(s) and possible jumps back to the
> > old code stream.
>
> Just out of interest, how does it handle the threading issue?
>
> Last I saw, at least some CPU people were _very_ nervous about overwriting
> instructions if another CPU might be just about to execute them.
I think the issue was that ring 0 was never meant to do that, where as,
ring 3 does it all the time. Doesn't the dynamic library modify its
text?
-- Steve
>
> Even the "overwrite only the first byte with 'int3'" made them go "umm, I
> need to talk to some core CPU people to see if that's ok". They mumble
> about possible CPU errata, I$ coherency, instruction retry etc.
>
> I realize kprobes does this very thing, but kprobes is esoteric stuff and
> doesn't have much choice. In user space, you _could_ do the modification
> on a different physical page and then just switch the page table entry
> instead, and not get into the whole D$/I$ coherency thing at all.
>
> Linus
--
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