From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2867 invoked by alias); 2 Aug 2005 03:35:41 -0000 Mailing-List: contact systemtap-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sources.redhat.com Received: (qmail 2856 invoked by uid 22791); 2 Aug 2005 03:35:37 -0000 Message-ID: <42EEEC7A.3070603@opersys.com> Date: Tue, 02 Aug 2005 03:35:00 -0000 From: Karim Yaghmour Reply-To: karim@opersys.com Organization: Opersys inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2 X-Accept-Language: en-us, en, fr, fr-be, fr-ca, fr-fr MIME-Version: 1.0 To: Roland McGrath CC: "Keshavamurthy, Anil S" , Mathieu Desnoyers , Andi Kleen , Masami Hiramatsu , Masami Hiramatsu , Richard J Moore , systemtap@sources.redhat.com, sugita@sdl.hitachi.co.jp, Satoshi Oshima , michel.dagenais@polymtl.ca Subject: Re: Hitachi djprobe mechanism References: <20050802032137.DE2E5180EC3@magilla.sf.frob.com> In-Reply-To: <20050802032137.DE2E5180EC3@magilla.sf.frob.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-q3/txt/msg00230.txt.bz2 Roland McGrath wrote: > At this point, you know that no CPU's PC can get into the probe-insertion > area without hitting the int3. There is no danger of "half baked" > instruction decoding because any CPU getting there hits the breakpoint and > enters an explicit synchronization path through kprobes infrastructure code. > A CPU that hits this breakpoint can either wait for the probe inserter to > finish, or it could just handle it in kprobes style and move on if the > instruction following the one copied by kprobes is outside the mutation area. > > You store the remaining bytes of the probe jmp instruction. Then store the > first byte, replacing the int3. Then let any synchronized CPUs continue; > they could either resume kprobe-style processing, or back up the PC and > restart to allow the new probe-inserted jmp to happen. Possibly works if you're operating on instructions of 5 bytes or more only. Karim -- Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || karim@opersys.com || 1-866-677-4546