All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Anton Arapov <anton@redhat.com>, Frank Eigler <fche@redhat.com>,
	Josh Stone <jistone@redhat.com>,
	"Suzuki K. Poulose" <suzuki@in.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] uprobes/x86: Change __skip_sstep() to actually skip	the whole insn
Date: Tue, 8 Jan 2013 16:54:22 +0530	[thread overview]
Message-ID: <20130108112422.GB1325@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121230154719.GA28510@redhat.com>

* Oleg Nesterov <oleg@redhat.com> [2012-12-30 16:47:19]:

> __skip_sstep() doesn't update regs->ip. Currently this is correct
> but only "by accident" and it doesn't skip the whole insn. Change
> it to advance ->ip by the length of the detected 0x66*0x90 sequence.
> 
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

> ---
>  arch/x86/kernel/uprobes.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
> index c71025b..4e33a35 100644
> --- a/arch/x86/kernel/uprobes.c
> +++ b/arch/x86/kernel/uprobes.c
> @@ -680,8 +680,11 @@ static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
>  		if (auprobe->insn[i] == 0x66)
>  			continue;
> 
> -		if (auprobe->insn[i] == 0x90)
> +		if (auprobe->insn[i] == 0x90) {
> +			regs->ip = uprobe_get_swbp_addr(regs);
> +			regs->ip += i + 1;
>  			return true;
> +		}
> 
>  		break;
>  	}
> -- 
> 1.5.5.1
> 


  parent reply	other threads:[~2013-01-08 11:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-30 15:46 [PATCH 0/2] uprobes: Change handle_swbp() to expose bp_vaddr to handler_chain() Oleg Nesterov
2012-12-30 15:47 ` [PATCH 1/2] uprobes/x86: Change __skip_sstep() to actually skip the whole insn Oleg Nesterov
2013-01-02 13:16   ` Anton Arapov
2013-01-03 12:01   ` Srikar Dronamraju
2013-01-08 11:24   ` Srikar Dronamraju [this message]
2012-12-30 15:47 ` [PATCH 2/2] uprobes: Change handle_swbp() to expose bp_vaddr to handler_chain() Oleg Nesterov
2012-12-31  8:35   ` Ananth N Mavinakayanahalli
2013-01-08 11:39   ` Srikar Dronamraju

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=20130108112422.GB1325@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=anton@redhat.com \
    --cc=fche@redhat.com \
    --cc=jistone@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --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.