|
|
Subscribe / Log in / New account

Re: [PATCH v2] Return proper error code from register_kprobe()

From:  Andrew Morton <akpm-AT-linux-foundation.org>
To:  Prashanth Nageshappa <prashanth-AT-linux.vnet.ibm.com>
Subject:  Re: [PATCH v2] Return proper error code from register_kprobe()
Date:  Wed, 15 Feb 2012 13:23:10 -0800
Message-ID:  <20120215132310.21c0dc77.akpm@linux-foundation.org>
Cc:  masami.hiramatsu.pt-AT-hitachi.com, ananth-AT-in.ibm.com, linux-kernel-AT-vger.kernel.org, jbaron-AT-redhat.com, rostedt-AT-goodmis.org, srikar-AT-linux.vnet.ibm.com, stable-AT-vger.kernel.org
Archive‑link:  Article

On Wed, 15 Feb 2012 12:46:03 +0530
Prashanth Nageshappa <prashanth@linux.vnet.ibm.com> wrote:

> register_kprobe() aborts if the address of the new request falls in a
> prohibited area (such as ftrace pouch, __kprobes annotated functions,

I'm sitting here wondering what you meant to type when you typed
"ftrace pouch".  I'm stumped!  But you're not allowed to tell us - that
would take all the fun out of it.

> non-kernel text addresses, jump label text). We however don't return the
> right error on this abort, resulting in a silent failure - incorrect 
> adding/reporting of kprobes ('perf probe do_fork+18' or
> 'perf probe mcount' for instance).
> 
> In V2 we are incorporating Masami Hiramatsu's  feedback.
> 
> This patch fixes it by returning -EINVAL upon failure.
> 
> While we are here, rename the label used for exit to be more appropriate.
> 
> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Signed-off-by: Prashanth K Nageshappa <prashanth@linux.vnet.ibm.com>
> Cc: stable@vger.kernel.org

So we want this for 3.3 with a -stable backport.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



to post comments


Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds