All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: ppcdev <linuxppc-dev@lists.ozlabs.org>,
	lkml <linux-kernel@vger.kernel.org>,
	oleg@redhat.com
Subject: Re: [PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints
Date: Tue, 26 Mar 2013 17:36:44 +0530	[thread overview]
Message-ID: <20130326120644.GC20399@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130322151838.GD20010@in.ibm.com>

* Ananth N Mavinakayanahalli <ananth@in.ibm.com> [2013-03-22 20:48:38]:

> From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> 
> Powerpc has many trap variants that could be used by entities like gdb.
> Currently, running gdb on a program being traced by uprobes causes an
> endless loop since uprobes doesn't understand that the trap was inserted
> by some other entity and a SIGTRAP needs to be delivered.
> 
> Teach uprobes to ignore breakpoints that do not belong to it.
> 
> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

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

> ---
>  arch/powerpc/kernel/uprobes.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> Index: linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> ===================================================================
> --- linux-3.9-rc3.orig/arch/powerpc/kernel/uprobes.c
> +++ linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> @@ -31,6 +31,16 @@
>  #define UPROBE_TRAP_NR	UINT_MAX
> 
>  /**
> + * is_trap_insn - check if the instruction is a trap variant
> + * @insn: instruction to be checked.
> + * Returns true if @insn is a trap variant.
> + */
> +bool is_trap_insn(uprobe_opcode_t *insn)
> +{
> +	return (is_trap(*insn));
> +}
> +
> +/**
>   * arch_uprobe_analyze_insn
>   * @mm: the probed address space.
>   * @arch_uprobe: the probepoint information.

-- 
Thanks and Regards
Srikar Dronamraju

WARNING: multiple messages have this Message-ID (diff)
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	oleg@redhat.com, benh@kernel.crashing.org,
	ppcdev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints
Date: Tue, 26 Mar 2013 17:36:44 +0530	[thread overview]
Message-ID: <20130326120644.GC20399@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130322151838.GD20010@in.ibm.com>

* Ananth N Mavinakayanahalli <ananth@in.ibm.com> [2013-03-22 20:48:38]:

> From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> 
> Powerpc has many trap variants that could be used by entities like gdb.
> Currently, running gdb on a program being traced by uprobes causes an
> endless loop since uprobes doesn't understand that the trap was inserted
> by some other entity and a SIGTRAP needs to be delivered.
> 
> Teach uprobes to ignore breakpoints that do not belong to it.
> 
> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

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

> ---
>  arch/powerpc/kernel/uprobes.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> Index: linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> ===================================================================
> --- linux-3.9-rc3.orig/arch/powerpc/kernel/uprobes.c
> +++ linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> @@ -31,6 +31,16 @@
>  #define UPROBE_TRAP_NR	UINT_MAX
> 
>  /**
> + * is_trap_insn - check if the instruction is a trap variant
> + * @insn: instruction to be checked.
> + * Returns true if @insn is a trap variant.
> + */
> +bool is_trap_insn(uprobe_opcode_t *insn)
> +{
> +	return (is_trap(*insn));
> +}
> +
> +/**
>   * arch_uprobe_analyze_insn
>   * @mm: the probed address space.
>   * @arch_uprobe: the probepoint information.

-- 
Thanks and Regards
Srikar Dronamraju


  reply	other threads:[~2013-03-26 12:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 15:16 [PATCH v2 1/4] uprobes: add trap variant helper Ananth N Mavinakayanahalli
2013-03-22 15:16 ` Ananth N Mavinakayanahalli
2013-03-22 15:17 ` [PATCH v2 2/4] uprobes: refuse uprobe on trap variants Ananth N Mavinakayanahalli
2013-03-22 15:17   ` Ananth N Mavinakayanahalli
2013-03-26 12:06   ` Srikar Dronamraju
2013-03-26 12:06     ` Srikar Dronamraju
2013-03-22 15:18 ` [PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints Ananth N Mavinakayanahalli
2013-03-22 15:18   ` Ananth N Mavinakayanahalli
2013-03-26 12:06   ` Srikar Dronamraju [this message]
2013-03-26 12:06     ` Srikar Dronamraju
2013-03-22 15:19 ` [PATCH v2 4/4] uprobes/powerpc: remove additional trap instruction check Ananth N Mavinakayanahalli
2013-03-22 15:19   ` Ananth N Mavinakayanahalli
2013-03-26 12:07   ` Srikar Dronamraju
2013-03-26 12:07     ` Srikar Dronamraju
2013-03-23 18:08 ` [PATCH v2 1/4] uprobes: add trap variant helper Oleg Nesterov
2013-03-23 18:08   ` Oleg Nesterov
2013-03-26 12:06 ` Srikar Dronamraju
2013-03-26 12:06   ` 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=20130326120644.GC20399@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oleg@redhat.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.