aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
diff options
context:
space:
mode:
authorDomagoj Stolfa <domagoj.stolfa@gmail.com>2021-12-17 16:01:54 +0000
committerMark Johnston <markj@FreeBSD.org>2021-12-17 18:10:22 +0000
commit30ec3138edc9d491446409910f52ccb1b158253e (patch)
treec7874783c5a6bba40192089d006253b7f70e29a2 /sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
parentee5686c614ba7e11e8586b2e5b02dfc550679e96 (diff)
downloadsrc-30ec3138edc9d491446409910f52ccb1b158253e.tar.gz
src-30ec3138edc9d491446409910f52ccb1b158253e.zip
dtrace: Disable getf() as it is broken on FreeBSD
getf() on FreeBSD calls _sx_slock(), _sx_sunlock() and fget_locked(). Furthermore, it does not set the per-core fault flag, meaning it usually ends up in a double fault panic once getf() does get called, especially from fbt. Reviewing the DTrace Toolkit + a number of other scripts scattered around FreeBSD, I have not been able to find one use of getf(). Given how broken the implementation currently is, we disable it until it can be implemented properly. Also comment out a test in aggs/tst.subr.d for getf(). Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33378
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index ad14482b80b5..4798db98f6fe 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -10014,6 +10014,9 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
}
if (subr == DIF_SUBR_GETF) {
+#ifdef __FreeBSD__
+ err += efunc(pc, "getf() not supported");
+#else
/*
* If we have a getf() we need to record that
* in our state. Note that our state can be
@@ -10024,6 +10027,7 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
*/
if (vstate->dtvs_state != NULL)
vstate->dtvs_state->dts_getf++;
+#endif
}
break;