From: Ananth N Mavinakayanahalli o Remove verbose printk during registration with kprobes globally disabled o Print out a message when kprobes are enabled/disabled globally Signed-off-by: Ananth N Mavinakyanahalli Cc: Srinivasa DS Signed-off-by: Andrew Morton --- kernel/kprobes.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff -puN kernel/kprobes.c~kprobes-the-on-off-knob-thru-debugfs-updated-fix-fix kernel/kprobes.c --- a/kernel/kprobes.c~kprobes-the-on-off-knob-thru-debugfs-updated-fix-fix +++ a/kernel/kprobes.c @@ -575,10 +575,7 @@ static int __kprobes __register_kprobe(s register_page_fault_notifier(&kprobe_page_fault_nb); arch_arm_kprobe(p); - } else - printk("Kprobes are globally disabled. This kprobe [@ %p] " - "will be enabled with all other probes\n", p->addr); - + } out: mutex_unlock(&kprobe_mutex); @@ -929,6 +926,7 @@ static void __kprobes enable_all_kprobes } kprobe_enabled = true; + printk("Kprobes globally enabled\n"); already_enabled: mutex_unlock(&kprobe_mutex); @@ -949,6 +947,7 @@ static void __kprobes disable_all_kprobe goto already_disabled; kprobe_enabled = false; + printk("Kprobes globally disabled\n"); for (i = 0; i < KPROBE_TABLE_SIZE; i++) { head = &kprobe_table[i]; hlist_for_each_entry_rcu(p, node, head, hlist) { _