The patch titled
     i386 Text Edit Lock: kprobes
has been removed from the -mm tree.  Its filename was
     i386-text-edit-lock-kprobes.patch

This patch was dropped because it had testing failures

------------------------------------------------------
Subject: i386 Text Edit Lock: kprobes
From: Mathieu Desnoyers <[EMAIL PROTECTED]>

Kprobes can use the text edit lock to insure mutual exclusion when edition the
code and make sure the pages are writable.

Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Cc: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 arch/i386/kernel/kprobes.c |   30 ++++--------------------------
 1 files changed, 4 insertions(+), 26 deletions(-)

diff -puN arch/i386/kernel/kprobes.c~i386-text-edit-lock-kprobes 
arch/i386/kernel/kprobes.c
--- a/arch/i386/kernel/kprobes.c~i386-text-edit-lock-kprobes
+++ a/arch/i386/kernel/kprobes.c
@@ -169,42 +169,20 @@ int __kprobes arch_prepare_kprobe(struct
 
 void __kprobes arch_arm_kprobe(struct kprobe *p)
 {
-       unsigned long addr = (unsigned long) p->addr;
-       int page_readonly = 0;
-
-       if (kernel_readonly_text(addr)) {
-               page_readonly = 1;
-               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RWX);
-               global_flush_tlb();
-       }
-
+       kernel_text_lock((unsigned long)p->addr, sizeof(kprobe_opcode_t));
        *p->addr = BREAKPOINT_INSTRUCTION;
+       kernel_text_unlock((unsigned long)p->addr, sizeof(kprobe_opcode_t));
        flush_icache_range((unsigned long) p->addr,
                           (unsigned long) p->addr + sizeof(kprobe_opcode_t));
-
-       if (page_readonly) {
-               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RX);
-               global_flush_tlb();
-       }
 }
 
 void __kprobes arch_disarm_kprobe(struct kprobe *p)
 {
-       unsigned long addr = (unsigned long) p->addr;
-       int page_readonly = 0;
-
-       if (kernel_readonly_text(addr)) {
-               page_readonly = 1;
-               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RWX);
-               global_flush_tlb();
-       }
+       kernel_text_lock((unsigned long)p->addr, sizeof(kprobe_opcode_t));
        *p->addr = p->opcode;
+       kernel_text_unlock((unsigned long)p->addr, sizeof(kprobe_opcode_t));
        flush_icache_range((unsigned long) p->addr,
                           (unsigned long) p->addr + sizeof(kprobe_opcode_t));
-       if (page_readonly) {
-               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RX);
-               global_flush_tlb();
-       }
 }
 
 void __kprobes arch_remove_kprobe(struct kprobe *p)
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

powerpc-promc-remove-undef-printk.patch
i386-text-edit-lock-kprobes.patch
immediate-values-global-modules-list-and-module-mutex.patch
immediate-value-architecture-independent-code.patch
immediate-values-non-optimized-architectures.patch
immediate-value-add-kconfig-menus.patch
immediate-values-kprobe-header-fix.patch
immediate-value-i386-optimization.patch
immediate-value-powerpc-optimization.patch
immediate-value-documentation.patch
f00f-bug-fixup-for-i386-use-immediate-values.patch
scheduler-profiling-use-immediate-values.patch
scheduler-profiling-use-immediate-values-fix.patch
cxgb3-vs-immediate-stuff.patch
use-data_data-in-cris.patch
add-missing-data_data-in-powerpc.patch
use-data_data-in-xtensa.patch
linux-kernel-markers-architecture-independent-code.patch
linux-kernel-markers-add-kconfig-menus-for-the-marker-code.patch
linux-kernel-markers-documentation.patch
port-of-blktrace-to-the-linux-kernel-markers.patch
port-of-blktrace-to-the-linux-kernel-markers-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to