The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66eedcb0224df03e56513f3caf1df93a52b6a919
commit 66eedcb0224df03e56513f3caf1df93a52b6a919 Author: Mark Johnston <[email protected]> AuthorDate: 2026-01-13 15:35:05 +0000 Commit: Mark Johnston <[email protected]> CommitDate: 2026-01-13 17:07:37 +0000 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. --- sys/cddl/dev/sdt/sdt.c | 3 +++ sys/sys/param.h | 2 +- sys/sys/sdt.h | 2 +- 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. */ };
