DTRACE_PRIV(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– DTRACE_PRIV(4) πŸ’–

okay so bestie, welcome to the Kernel Interfaces Manual page for dtrace_priv. Yes, that's DTRACE_PRIV(4) β€” a DTrace provider for the kernel privilege checking API. It's giving observability, but make it cute. ✨

🌸 NAME 🌸

dtrace_priv β€” a DTrace provider for the kernel privilege checking API πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

priv:kernel:priv_check:priv-ok
priv:kernel:priv_check:priv-err

✨ DESCRIPTION ✨

The priv provider lets you trace the priv(9) API. No cap.

The priv:kernel:priv_check:priv-ok probe fires when a kernel privilege check succeeds. Slay. πŸ’–

The priv:kernel:priv_check:priv-err probe fires when a kernel privilege check fails. 😭

The only argument to the priv probes, args[0], is the requested privilege number int priv. That's it β€” that's the whole argument situation. 🫢

πŸŽ€ EXAMPLES πŸŽ€

Example 1: Tracing Kernel Privilege Check Failures

The following script captures an array of counters, one for each stack trace leading to a failed kernel privilege check. Literally doing the most for diagnostics. πŸ”₯

priv:::priv-err
{
        @traces[stack()] = count();
}

🌈 SEE ALSO 🌈

πŸ‘‘ AUTHORS πŸ‘‘

The priv provider was written by Robert N. M. Watson <rwatson@FreeBSD.org>. 🫑

This manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>. πŸ’–


mwah πŸ’‹ β€” brought to you by the Debian crew, dated November 12, 2025 πŸŽ€βœ¨

πŸ“¦ where this page comes from