From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1339134714.25573.4.camel@concordia> Subject: Re: [PATCH 2/2] [POWERPC] uprobes: powerpc port From: Michael Ellerman To: ananth@in.ibm.com Date: Fri, 08 Jun 2012 15:51:54 +1000 In-Reply-To: <20120608043605.GB13409@in.ibm.com> References: <20120606091950.GB6745@in.ibm.com> <20120606092150.GC6745@in.ibm.com> <1338974822.2749.89.camel@twins> <20120606093541.GA29580@in.ibm.com> <1339006084.3458.25.camel@localhost> <20120608043605.GB13409@in.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Jim Keniston , Srikar Dronamraju , Peter Zijlstra , lkml , oleg@redhat.com, Paul Mackerras , Anton Blanchard , Ingo Molnar , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2012-06-08 at 10:06 +0530, Ananth N Mavinakayanahalli wrote: > On Wed, Jun 06, 2012 at 11:08:04AM -0700, Jim Keniston wrote: > > On Wed, 2012-06-06 at 15:05 +0530, Ananth N Mavinakayanahalli wrote: > > > On Wed, Jun 06, 2012 at 11:27:02AM +0200, Peter Zijlstra wrote: > > > > On Wed, 2012-06-06 at 14:51 +0530, Ananth N Mavinakayanahalli wrote: > > ... > > > > For the kernel, the only ones that are off limits are rfi (return from > > > interrupt), mtmsr (move to msr). All other instructions can be probed. > > > > > > Both those instructions are supervisor level, so we won't see them in > > > userspace at all; so we should be able to probe all user level > > > instructions. > > > > Presumably rfi or mtmsr could show up in the instruction stream via an > > erroneous or mischievous asm statement. It'd be good to verify that you > > handle that gracefully. > > That'd be flagged elsewhere, by the architecture itself -- you'd get a > privileged instruciton exception if you try execute any instruction not > part of the UISA. I therefore don't think its a necessary check in the > uprobes code. But you're not executing the instruction, you're passing it to emulate_step(). Or am I missing something? cheers