]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
delete queue-3.0/kprobes-return-proper-error-code-from-register_kprobe.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 17:31:55 +0000 (10:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 17:31:55 +0000 (10:31 -0700)
queue-3.0/kprobes-return-proper-error-code-from-register_kprobe.patch [deleted file]
queue-3.0/series

diff --git a/queue-3.0/kprobes-return-proper-error-code-from-register_kprobe.patch b/queue-3.0/kprobes-return-proper-error-code-from-register_kprobe.patch
deleted file mode 100644 (file)
index cda8b54..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From f986a499ef6f317d906e6f6f281be966e1237a10 Mon Sep 17 00:00:00 2001
-From: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
-Date: Mon, 5 Mar 2012 14:59:12 -0800
-Subject: kprobes: return proper error code from register_kprobe()
-
-From: Prashanth Nageshappa <prashanth@linux.vnet.ibm.com>
-
-commit f986a499ef6f317d906e6f6f281be966e1237a10 upstream.
-
-register_kprobe() aborts if the address of the new request falls in a
-prohibited area (such as ftrace pouch, __kprobes annotated functions,
-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>
-Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
-Cc: Jason Baron <jbaron@redhat.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- kernel/kprobes.c |   12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
---- a/kernel/kprobes.c
-+++ b/kernel/kprobes.c
-@@ -1324,8 +1324,10 @@ int __kprobes register_kprobe(struct kpr
-       if (!kernel_text_address((unsigned long) p->addr) ||
-           in_kprobes_functions((unsigned long) p->addr) ||
-           ftrace_text_reserved(p->addr, p->addr) ||
--          jump_label_text_reserved(p->addr, p->addr))
--              goto fail_with_jump_label;
-+          jump_label_text_reserved(p->addr, p->addr)) {
-+              ret = -EINVAL;
-+              goto cannot_probe;
-+      }
-       /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */
-       p->flags &= KPROBE_FLAG_DISABLED;
-@@ -1340,7 +1342,7 @@ int __kprobes register_kprobe(struct kpr
-                * its code to prohibit unexpected unloading.
-                */
-               if (unlikely(!try_module_get(probed_mod)))
--                      goto fail_with_jump_label;
-+                      goto cannot_probe;
-               /*
-                * If the module freed .init.text, we couldn't insert
-@@ -1349,7 +1351,7 @@ int __kprobes register_kprobe(struct kpr
-               if (within_module_init((unsigned long)p->addr, probed_mod) &&
-                   probed_mod->state != MODULE_STATE_COMING) {
-                       module_put(probed_mod);
--                      goto fail_with_jump_label;
-+                      goto cannot_probe;
-               }
-       }
-       preempt_enable();
-@@ -1396,7 +1398,7 @@ out:
-       return ret;
--fail_with_jump_label:
-+cannot_probe:
-       preempt_enable();
-       jump_label_unlock();
-       return -EINVAL;
index fab5015c3c32b64ad641a9ffdc6ed8e3952ace46..828de08d243d47c16f2c6119cfa17e0e89c1230c 100644 (file)
@@ -26,7 +26,6 @@ nommu-don-t-need-to-clear-vm_mm-when-deleting-a-vma.patch
 cifs-fix-dentry-refcount-leak-when-opening-a-fifo-on-lookup.patch
 mac80211-zero-initialize-count-field-in-ieee80211_tx_rate.patch
 ath9k_hw-prevent-writes-to-const-data-on-ar9160.patch
-kprobes-return-proper-error-code-from-register_kprobe.patch
 mm-thp-fix-bug-on-mm-nr_ptes.patch
 hid-usbhid-add-noget-quirk-for-the-airen-slim-keyboard.patch
 crypto-mv_cesa-fix-final-callback-not-ignoring-input-data.patch