From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17821 invoked by alias); 3 Feb 2006 21:08:57 -0000 Received: (qmail 17813 invoked by uid 22791); 3 Feb 2006 21:08:56 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.194) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Feb 2006 21:08:55 +0000 Received: by xproxy.gmail.com with SMTP id h28so755879wxd for ; Fri, 03 Feb 2006 13:08:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DVhb+/p5U/3zomXsxDlvgin12KAk/tn8CByBsc/Wtrh1zWgLhvfI7wpvRUn/nBSFbuIEhrsGNifSnWS+Yoo9Nsa+O+BHYMHgcijxo9mKgyU9H6DHC0Qc/wR7m62wEBP3lxB6ENeSCJ6aEe2EPc9kwGHHCqzMdtD0i71yBHAuDDo= Received: by 10.70.19.6 with SMTP id 6mr2698962wxs; Fri, 03 Feb 2006 13:08:52 -0800 (PST) Received: by 10.70.8.4 with HTTP; Fri, 3 Feb 2006 13:08:52 -0800 (PST) Message-ID: Date: Fri, 03 Feb 2006 21:08:00 -0000 From: James Dickens To: "Stone, Joshua I" Subject: Re: user kprobes vs debuggers Cc: Vara Prasad , "Frank Ch. Eigler" , systemtap@sources.redhat.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00382.txt.bz2 On 2/3/06, Stone, Joshua I wrote: > Vara Prasad wrote: > > Let us say if there is no user space probes involved debugger > > remembers the original instruction before replacing it is with > > breakpoint instruction. It single steps the original instruction that > > is stored in the userspace. Let us say if there is no debugger and > > there is only userspace probes userspace pobes does the same single > > stepping but in the kernel space. Another important distinction to > > remember here is each of them have their own handlers to run when the > > break point is hit. Based on the above background there is a global > > registry of the breakpoints in the kernel that is only used to notify > > who all would like to handle this breakpoint but it is up to each of > > the owners to run their own handlers and as well as handle single > > stepping. > > Sure, I see no issue when only a debugger or a userspace probe > instruments a given address - they just single-step it themselves. The > issue I was referring to is when a debugger and a userspace probe try to > instrument the same address. In that scenario it's not clear who should > single-step the original instruction and how. > > It's made worse if probes & debuggers are registered & removed in an > interleaved fashion - e.g. probe A registers; debugger B registers; A is > removed; what happens to B? > > > I think it would have been o.k to disallow but due to common uses like > > strace people might object to userspace probes feature. > > You only have to disallow probes & debugger breakpoints coexisting at > the same address - if they're at different addresses then there's no > problem. If that's still too restrictive, then we need to resolve the > issues above. > what happens in the case of debugger put a breakpoint in a private copy of a shared library? how do we probe and monitor this? and also all calls to function XXX of a non private library so can monitor all=20 malloc's done by userland apps for instance. James Dickens uadmin.blogspot.com > Josh >