linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS Kprobes: Support branch instructions probing

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] MIPS Kprobes: Support branch instructions probing
From: Victor Kamensky <kamensky@cisco.com>
Date: Thu, 13 Oct 2011 12:16:27 -0700 (PDT)
Cc: David Daney <david.daney@cavium.com>, manesoni@cisco.com, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, ananth@in.ibm.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=kamensky@cisco.com; l=1300; q=dns/txt; s=iport; t=1318533395; x=1319742995; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=kCOm0p0jHIuwKTTRh9wRM7Z9XdZNQGDZhM07BaFeitU=; b=SyWH2BkMfgquu7qOsvBqHOjr3y69BqFyLG9pVg6UU+Tu8vwuD8phbGoO TVH8wyYsf1WIxk6JEe1mdogbFN5Ed370K5vSSl4pX/CSpf8yI7Rl37ho7 MSLtnv/4mxZpSyEa80gT8eZAwr2pa5BAgx/MpbCdWcVTb46jZzVrOe57l 4=;
In-reply-to: <20111013180714.GA7422@linux-mips.org>
References: <20111013090749.GB16761@cisco.com> <4E971FD3.2020308@cavium.com> <20111013180714.GA7422@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org

On Thu, 13 Oct 2011, Ralf Baechle wrote:

> On Thu, Oct 13, 2011 at 10:28:51AM -0700, David Daney wrote:
>
> > Where is the handling for:
> >
> >     case cop1_op:
> >
> > #ifdef CONFIG_CPU_CAVIUM_OCTEON
> >     case lwc2_op: /* This is bbit0 on Octeon */
> >     case ldc2_op: /* This is bbit032 on Octeon */
> >     case swc2_op: /* This is bbit1 on Octeon */
> >     case sdc2_op: /* This is bbit132 on Octeon */
> > #endif
> >
> > These are all defined in insn_has_delayslot() but not here.

David, nice catch!

> Which is a wonderful demonstration for why duplicating such a large
> function from branch.c was a baaad thing to do.
>
> Maneesh, can you refactor the code to share everything that was copied
> from __compute_return_epc() can be shared with kprobes?  Idealy make
> everything a two part series, first one patch to refactor branch.c

Yes, it does make a lot of sense. Don't you think we need to do
EXPORT_SYMBOL for __compute_return_epc as well? So it could be used by
klms.

Actually we have yet another copy of it in mips uprobes code, which
normally is built as klm, if we refactor and export __compute_return_epc
all three places could use the same function.

Thanks,
Victor

> and
> the 2nd patch to deal with kprobes.
>
> Thanks,
>
>   Ralf
>

<Prev in Thread] Current Thread [Next in Thread>