All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: "Suzuki K. Poulose" <suzuki@in.ibm.com>,
	bigeasy@linutronix.de, srikar@linux.vnet.ibm.com,
	peterz@infradead.org, benh@kernel.crashing.org, mingo@elte.hu,
	anton@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/4] uprobes/powerpc: Make use of generic routines to enable single step
Date: Tue, 18 Dec 2012 20:10:13 +0100	[thread overview]
Message-ID: <20121218191013.GA26913@redhat.com> (raw)
In-Reply-To: <20121218053603.GB6116@in.ibm.com>

On 12/18, Ananth N Mavinakayanahalli wrote:
>
> On Fri, Dec 14, 2012 at 09:02:41PM +0100, Oleg Nesterov wrote:
> > >
> > > -	uprobe_restore_context_sstep(&utask->autask);
> > > +	uprobe_restore_context_sstep(&utask->autask, regs);
> >
> > I am not sure ppc needs this, but note that x86 does a bit more.
> >
> > Not only we need to restore the "single-step" state, we need to
> > send SIGTRAP if it was not set by us. The same for _skip_sstep.
>
> Do you mean restoring the TF equivalent on powerpc to what it was before?
>
> If so, powerpc has always been unique in this aspect -- the single-step
> exception handler *always* resets the sstep bit in MSR. Any user needing
> to continue single-stepping has to explicitly set it again.

I meant another thing.

Suppose that, say, gdb tries to single-step over the probed insn.
In this case we need to send SIGTRAP after xol/emulate. Please look at
send_sig(SIGTRAP) in arch/x86/kernel/uprobes.c:arch_uprobe_post_xol()
and arch_uprobe_skip_sstep().

Oleg.


  reply	other threads:[~2012-12-18 19:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 15:07 [PATCH v2 0/4] uprobes/powerpc: Replace ptrace helpers for single stepping Suzuki K. Poulose
2012-12-03 15:07 ` [PATCH v2 1/4] kprobes/powerpc: Do not disable External interrupts during single step Suzuki K. Poulose
2012-12-03 15:07   ` Suzuki K. Poulose
2012-12-11  5:48   ` Suzuki K. Poulose
2012-12-11  5:48     ` Suzuki K. Poulose
2013-01-04  4:42     ` Benjamin Herrenschmidt
2013-01-04  4:42       ` Benjamin Herrenschmidt
2013-01-07 12:03       ` Sebastian Andrzej Siewior
2013-01-07 12:03         ` Sebastian Andrzej Siewior
2012-12-03 15:08 ` [PATCH v2 2/4] powerpc: Move the single step enable code to a generic path Suzuki K. Poulose
2012-12-03 15:08   ` Suzuki K. Poulose
2012-12-10 10:34   ` Ananth N Mavinakayanahalli
2012-12-10 10:34     ` Ananth N Mavinakayanahalli
2012-12-03 15:09 ` [PATCH v2 3/4] uprobes/powerpc: Introduce routines for save/restore context Suzuki K. Poulose
2012-12-03 15:15   ` Ananth N Mavinakayanahalli
2012-12-03 15:48     ` Suzuki K. Poulose
2012-12-10 10:35   ` Ananth N Mavinakayanahalli
2012-12-03 15:10 ` [PATCH v2 4/4] uprobes/powerpc: Make use of generic routines to enable single step Suzuki K. Poulose
2012-12-10 10:35   ` Ananth N Mavinakayanahalli
2012-12-14 20:02   ` Oleg Nesterov
2012-12-18  5:11     ` Suzuki K. Poulose
2012-12-18  5:36     ` Ananth N Mavinakayanahalli
2012-12-18 19:10       ` Oleg Nesterov [this message]
2012-12-19  4:53         ` Ananth N Mavinakayanahalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121218191013.GA26913@redhat.com \
    --to=oleg@redhat.com \
    --cc=ananth@in.ibm.com \
    --cc=anton@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=suzuki@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.