aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-01-13 15:35:05 +0000
committerMark Johnston <markj@FreeBSD.org>2026-01-13 17:07:37 +0000
commit66eedcb0224df03e56513f3caf1df93a52b6a919 (patch)
tree3603d9e7f01aa761d1e1537c2c66ea4372d406d4
parentacb71820d68bd0dd98964240727e251bc62c92de (diff)
sdt: Fix the probe ID type in struct sdt_probe
This is supposed to be a dtrace_id_t, which is a uint32_t, while id_t is a uint64_t. sdt.h avoids depending on dtrace.h so we can't use dtrace_id_t directly. Bump __FreeBSD_version since the layout of structures in the SDT probe linker set has changed. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc.
-rw-r--r--sys/cddl/dev/sdt/sdt.c3
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/sdt.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c
index 0a9059104671..97ef2de18525 100644
--- a/sys/cddl/dev/sdt/sdt.c
+++ b/sys/cddl/dev/sdt/sdt.c
@@ -60,6 +60,9 @@
#include <cddl/dev/dtrace/dtrace_cddl.h>
+_Static_assert(sizeof((struct sdt_probe *)NULL)->id == sizeof(dtrace_id_t),
+ "sdt_probe.id and dtrace_id_t size mismatch");
+
/* DTrace methods. */
static void sdt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *);
static uint64_t sdt_getargval(void *, dtrace_id_t, void *, int, int);
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 3b56c582be0e..d228859575c7 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -74,7 +74,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1600007
+#define __FreeBSD_version 1600008
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index cd45bc1a1ffd..f705be915684 100644
--- a/sys/sys/sdt.h
+++ b/sys/sys/sdt.h
@@ -447,7 +447,7 @@ struct sdt_probe {
const char *mod;
const char *func;
const char *name;
- id_t id; /* DTrace probe ID. */
+ uint32_t id; /* DTrace probe ID. */
int n_args; /* Number of arguments. */
struct linker_file *sdtp_lf; /* Module in which we're defined. */
};