lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1424967232-2923-8-git-send-email-pmladek@suse.cz>
Date:	Thu, 26 Feb 2015 17:13:52 +0100
From:	Petr Mladek <pmladek@...e.cz>
To:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"David S. Miller" <davem@...emloft.net>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
	Petr Mladek <pmladek@...e.cz>
Subject: [PATCH 7/7] kprobes: Mark globally disabled Kprobes in debugfs interface

Kprobes might get globally disabled by writing to
/sys/kernel/debug/kprobes/enabled but this situation
is not visible in /sys/kernel/debug/kprobes/list.

This patch updates the list, so that it shows [GLOBALLY DISABLED]
when the related Kprobe is enabled but globally disabled.

It also updates the Kprobes documentation.

Signed-off-by: Petr Mladek <pmladek@...e.cz>
---
 Documentation/kprobes.txt | 5 +++--
 kernel/kprobes.c          | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 4227ec2e3ab2..8de83af9cccb 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -701,8 +701,9 @@ is also specified. Following columns show probe status. If the probe is on
 a virtual address that is no longer valid (module init sections, module
 virtual addresses that correspond to modules that've been unloaded),
 such probes are marked with [GONE]. If the probe is temporarily disabled,
-such probes are marked with [DISABLED]. If the probe is optimized, it is
-marked with [OPTIMIZED].
+such probes are marked with [DISABLED]. It the probe is enabled but all probes
+are globally disabled, such probes are marked with [GLOBALLY DISABLED].
+If the probe is optimized, it is marked with [OPTIMIZED].
 
 /sys/kernel/debug/kprobes/enabled: Turn kprobes ON/OFF forcibly.
 
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 799f56a50cf9..7fc77c9cdd3b 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -2259,9 +2259,11 @@ static void report_probe(struct seq_file *pi, struct kprobe *p,
 
 	if (!pp)
 		pp = p;
-	seq_printf(pi, "%s%s%s%s\n",
+	seq_printf(pi, "%s%s%s%s%s\n",
 		(kprobe_gone(p) ? "[GONE]" : ""),
 		((kprobe_disabled(p) && !kprobe_gone(p)) ?  "[DISABLED]" : ""),
+		((!kprobe_disabled(p) && !kprobe_gone(p) &&
+		  kprobes_all_disarmed) ?  "[GLOBALLY DISABLED]" : ""),
 		(kprobe_optimized(pp) ? "[OPTIMIZED]" : ""),
 		(kprobe_ftrace(pp) ? "[FTRACE]" : ""));
 }
-- 
1.8.5.6

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ