summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2010-08-22 11:18:57 +0000
committerrpaulo <rpaulo@FreeBSD.org>2010-08-22 11:18:57 +0000
commitea11ba678823dbe5705fff2f6b2dbd5434fdea02 (patch)
tree6ac97777920c38ee27a1167a56b6790fef911dd1 /sys/security
parent46e8bd7ded82faf30289ba940bca95b4cba0d065 (diff)
downloadFreeBSD-src-ea11ba678823dbe5705fff2f6b2dbd5434fdea02.zip
FreeBSD-src-ea11ba678823dbe5705fff2f6b2dbd5434fdea02.tar.gz
Add an extra comment to the SDT probes definition. This allows us to get
use '-' in probe names, matching the probe names in Solaris.[1] Add userland SDT probes definitions to sys/sdt.h. Sponsored by: The FreeBSD Foundation Discussed with: rwaston [1]
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/mac/mac_framework.c8
-rw-r--r--sys/security/mac/mac_internal.h20
2 files changed, 15 insertions, 13 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c
index 1f43c02..fa06928 100644
--- a/sys/security/mac/mac_framework.c
+++ b/sys/security/mac/mac_framework.c
@@ -94,10 +94,12 @@ __FBSDID("$FreeBSD$");
SDT_PROVIDER_DEFINE(mac);
SDT_PROVIDER_DEFINE(mac_framework);
-SDT_PROBE_DEFINE2(mac, kernel, policy, modevent, "int",
+SDT_PROBE_DEFINE2(mac, kernel, policy, modevent, modevent, "int",
"struct mac_policy_conf *mpc");
-SDT_PROBE_DEFINE1(mac, kernel, policy, register, "struct mac_policy_conf *");
-SDT_PROBE_DEFINE1(mac, kernel, policy, unregister, "struct mac_policy_conf *");
+SDT_PROBE_DEFINE1(mac, kernel, policy, register, register,
+ "struct mac_policy_conf *");
+SDT_PROBE_DEFINE1(mac, kernel, policy, unregister, unregister,
+ "struct mac_policy_conf *");
/*
* Root sysctl node for all MAC and MAC policy controls.
diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h
index 39fc404..7244477 100644
--- a/sys/security/mac/mac_internal.h
+++ b/sys/security/mac/mac_internal.h
@@ -75,27 +75,27 @@ SDT_PROVIDER_DECLARE(mac_framework); /* Entry points to MAC. */
#define MAC_CHECK_PROBE_DEFINE4(name, arg0, arg1, arg2, arg3) \
SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac_check_err, \
- "int", arg0, arg1, arg2, arg3); \
+ mac-check-ok, "int", arg0, arg1, arg2, arg3); \
SDT_PROBE_DEFINE5(mac_framework, kernel, name, mac_check_ok, \
- "int", arg0, arg1, arg2, arg3);
+ mac-check-ok, "int", arg0, arg1, arg2, arg3);
#define MAC_CHECK_PROBE_DEFINE3(name, arg0, arg1, arg2) \
SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac_check_err, \
- "int", arg0, arg1, arg2); \
+ mac-check-err, "int", arg0, arg1, arg2); \
SDT_PROBE_DEFINE4(mac_framework, kernel, name, mac_check_ok, \
- "int", arg0, arg1, arg2);
+ mac-check-ok, "int", arg0, arg1, arg2);
#define MAC_CHECK_PROBE_DEFINE2(name, arg0, arg1) \
SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_check_err, \
- "int", arg0, arg1); \
+ mac-check-err, "int", arg0, arg1); \
SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_check_ok, \
- "int", arg0, arg1);
+ mac-check-ok, "int", arg0, arg1);
#define MAC_CHECK_PROBE_DEFINE1(name, arg0) \
SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac_check_err, \
- "int", arg0); \
+ mac-check-err, "int", arg0); \
SDT_PROBE_DEFINE2(mac_framework, kernel, name, mac_check_ok, \
- "int", arg0);
+ mac-check-ok, "int", arg0);
#define MAC_CHECK_PROBE4(name, error, arg0, arg1, arg2, arg3) do { \
if (error) { \
@@ -117,9 +117,9 @@ SDT_PROVIDER_DECLARE(mac_framework); /* Entry points to MAC. */
#define MAC_GRANT_PROBE_DEFINE2(name, arg0, arg1) \
SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_grant_err, \
- "int", arg0, arg1); \
+ mac-grant-err, "int", arg0, arg1); \
SDT_PROBE_DEFINE3(mac_framework, kernel, name, mac_grant_ok, \
- "INT", arg0, arg1);
+ mac-grant-ok, "INT", arg0, arg1);
#define MAC_GRANT_PROBE2(name, error, arg0, arg1) do { \
if (error) { \
OpenPOWER on IntegriCloud