Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dev/fbt fbt_provide_module_cb: exclude s...
details: https://anonhg.NetBSD.org/src/rev/5cb57add1a95
branches: trunk
changeset: 770508:5cb57add1a95
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Oct 19 10:55:50 2011 +0000
description:
fbt_provide_module_cb: exclude some functions known unsafe to probe
diffstat:
external/cddl/osnet/dev/fbt/fbt.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r d788decc10c2 -r 5cb57add1a95 external/cddl/osnet/dev/fbt/fbt.c
--- a/external/cddl/osnet/dev/fbt/fbt.c Wed Oct 19 10:53:12 2011 +0000
+++ b/external/cddl/osnet/dev/fbt/fbt.c Wed Oct 19 10:55:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fbt.c,v 1.9 2011/08/31 21:57:16 christos Exp $ */
+/* $NetBSD: fbt.c,v 1.10 2011/10/19 10:55:50 yamt Exp $ */
/*
* CDDL HEADER START
@@ -268,6 +268,21 @@
if (name[0] == '_' && name[1] == '_')
return (0);
+ /*
+ * Exclude some more symbols which can be called from probe context.
+ */
+ if (strcmp(name, "x86_curcpu") == 0 /* CPU */
+ || strcmp(name, "x86_curlwp") == 0 /* curproc, curlwp, curthread */
+ || strcmp(name, "cpu_index") == 0 /* cpu_number, curcpu_id */
+ || strncmp(name, "db_", 3) == 0 /* debugger */
+ || strncmp(name, "ddb_", 4) == 0 /* debugger */
+ || strncmp(name, "kdb_", 4) == 0 /* debugger */
+ || strncmp(name, "lockdebug_", 10) == 0 /* lockdebug XXX for now */
+ || strncmp(name, "kauth_", 5) == 0 /* CRED XXX for now */
+ ) {
+ return 0;
+ }
+
instr = (u_int8_t *) value;
limit = (u_int8_t *) value + symsize;
Home |
Main Index |
Thread Index |
Old Index