Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754125Ab0A0Gwe (ORCPT ); Wed, 27 Jan 2010 01:52:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753614Ab0A0Gwc (ORCPT ); Wed, 27 Jan 2010 01:52:32 -0500 Received: from casper.infradead.org ([85.118.1.10]:37575 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089Ab0A0Gwc (ORCPT ); Wed, 27 Jan 2010 01:52:32 -0500 Subject: Re: linux-next: add utrace tree From: Peter Zijlstra To: Linus Torvalds Cc: Tom Tromey , Kyle Moffett , "Frank Ch. Eigler" , Oleg Nesterov , Andrew Morton , Stephen Rothwell , Fr??d??ric Weisbecker , LKML , Steven Rostedt , Arnaldo Carvalho de Melo , linux-next@vger.kernel.org, "H. Peter Anvin" , utrace-devel@redhat.com, Thomas Gleixner , JimKeniston In-Reply-To: References: <20100121013822.28781960.sfr@canb.auug.org.au> <20100122005147.GD22003@redhat.com> <20100121170541.7425ff10.akpm@linux-foundation.org> <20100122182827.GA13185@redhat.com> <20100122200129.GG22003@redhat.com> <20100122221348.GA4263@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 27 Jan 2010 07:52:14 +0100 Message-ID: <1264575134.4283.1983.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1389 Lines: 32 On Tue, 2010-01-26 at 15:37 -0800, Linus Torvalds wrote: > > On Tue, 26 Jan 2010, Tom Tromey wrote: > > > > In non-stop mode (where you can stop one thread but leave the others > > running), gdb wants to have the breakpoints always inserted. So, > > something must emulate the displaced instruction. > > I'm almost totally uninterested in breakpoints that actually re-write > instructions. It's impossible to do that efficiently and well, especially > in threaded environments. > > So if you do instruction rewriting, I can only say "that's your problem". 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. I'm all in favor of not doing that extra vma and instead use stack or TLS space, but then people complain about having to make that executable (which is something I don't really mind, x86 had executable everything for very long, and also, its only so when debugging the thing anyway). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/