aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh47
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h1
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c5
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c29
-rw-r--r--cddl/lib/libavl/Makefile2
-rw-r--r--cddl/lib/libdtrace/Makefile1
-rw-r--r--cddl/lib/libdtrace/regs_x86.d6
-rw-r--r--cddl/lib/libdtrace/tcp.d22
-rw-r--r--cddl/lib/libicp/Makefile4
-rw-r--r--cddl/lib/libicp_rescue/Makefile2
-rw-r--r--cddl/lib/libnvpair/Makefile2
-rw-r--r--cddl/lib/libspl/Makefile2
-rw-r--r--cddl/lib/libtpool/Makefile2
-rw-r--r--cddl/lib/libumem/Makefile2
-rw-r--r--cddl/lib/libuutil/Makefile3
-rw-r--r--cddl/lib/libzfs/Makefile2
-rw-r--r--cddl/lib/libzfs_core/Makefile2
-rw-r--r--cddl/lib/libzfsbootenv/Makefile2
-rw-r--r--cddl/lib/libzpool/Makefile6
-rw-r--r--cddl/lib/libzutil/Makefile2
-rw-r--r--cddl/lib/pam_zfs_key/Makefile2
-rw-r--r--cddl/sbin/zfs/Makefile2
-rw-r--r--cddl/sbin/zpool/Makefile2
-rw-r--r--cddl/share/zfs/compatibility.d/Makefile2
-rw-r--r--cddl/usr.bin/zinject/Makefile1
-rw-r--r--cddl/usr.bin/zstream/Makefile2
-rw-r--r--cddl/usr.bin/ztest/Makefile1
-rw-r--r--cddl/usr.sbin/dtrace/tests/amd64/Makefile3
-rw-r--r--cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile19
-rw-r--r--cddl/usr.sbin/dwatch/dwatch.12
-rw-r--r--cddl/usr.sbin/dwatch/libexec/Makefile1
-rw-r--r--cddl/usr.sbin/zdb/Makefile1
-rw-r--r--cddl/usr.sbin/zfsd/Makefile1
-rw-r--r--cddl/usr.sbin/zfsd/zfsd.cc2
-rw-r--r--cddl/usr.sbin/zhack/Makefile1
35 files changed, 153 insertions, 33 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh
new file mode 100644
index 000000000000..e3585ca70793
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/amd64/kinst/tst.basic.ksh
@@ -0,0 +1,47 @@
+#!/usr/bin/ksh
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright (c) 2022 Mark Johnston <markj@FreeBSD.org>
+#
+
+script()
+{
+ $dtrace -q -s /dev/stdin <<__EOF__
+kinst::vm_fault: {}
+kinst::amd64_syscall: {}
+kinst::exit1: {}
+kinst::spinlock_enter: {}
+
+tick-10s {exit(0);}
+__EOF__
+}
+
+spin()
+{
+ while true; do
+ ls -la / >/dev/null 2>&1
+ done
+}
+
+if [ $# != 1 ]; then
+ echo expected one argument: '<'dtrace-path'>'
+ exit 2
+fi
+
+dtrace=$1
+
+spin &
+child=$!
+
+script
+exit $?
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
index b3f69bb6329d..1e62bd6b21db 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
@@ -323,6 +323,7 @@ struct dtrace_hdl {
#endif
int dt_fd; /* file descriptor for dtrace pseudo-device */
int dt_ftfd; /* file descriptor for fasttrap pseudo-device */
+ int dt_kinstfd; /* file descriptor for kinst pseudo-device */
int dt_fterr; /* saved errno from failed open of dt_ftfd */
int dt_cdefs_fd; /* file descriptor for C CTF debugging cache */
int dt_ddefs_fd; /* file descriptor for D CTF debugging cache */
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
index f55d488f4d91..867259b5d77c 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
@@ -416,6 +416,8 @@ static const dt_ident_t _dtrace_globals[] = {
&dt_idops_func, "void(int)" },
{ "rand", DT_IDENT_FUNC, 0, DIF_SUBR_RAND, DT_ATTR_STABCMN, DT_VERS_1_0,
&dt_idops_func, "int()" },
+{ "regs", DT_IDENT_ARRAY, 0, DIF_VAR_REGS, DT_ATTR_STABCMN, DT_VERS_1_13,
+ &dt_idops_regs, NULL },
{ "rindex", DT_IDENT_FUNC, 0, DIF_SUBR_RINDEX, DT_ATTR_STABCMN, DT_VERS_1_1,
&dt_idops_func, "int(const char *, const char *, [int])" },
#ifdef illumos
@@ -1171,6 +1173,7 @@ alloc:
dtp->dt_version = version;
dtp->dt_fd = dtfd;
dtp->dt_ftfd = ftfd;
+ dtp->dt_kinstfd = -1;
dtp->dt_fterr = fterr;
dtp->dt_cdefs_fd = -1;
dtp->dt_ddefs_fd = -1;
@@ -1679,6 +1682,8 @@ dtrace_close(dtrace_hdl_t *dtp)
(void) close(dtp->dt_fd);
if (dtp->dt_ftfd != -1)
(void) close(dtp->dt_ftfd);
+ if (dtp->dt_kinstfd != -1)
+ (void) close(dtp->dt_kinstfd);
if (dtp->dt_cdefs_fd != -1)
(void) close(dtp->dt_cdefs_fd);
if (dtp->dt_ddefs_fd != -1)
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
index 7cf352d4d505..2391690afc0b 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
@@ -48,6 +48,7 @@
#include <dt_list.h>
#include <dt_pid.h>
#include <dtrace.h>
+#include <kinst.h>
static dt_provider_t *
dt_provider_insert(dtrace_hdl_t *dtp, dt_provider_t *pvp, uint_t h)
@@ -699,6 +700,34 @@ dt_probe_info(dtrace_hdl_t *dtp,
prp = idp->di_data;
else if (pdp->dtpd_id != DTRACE_IDNONE)
prp = dt_probe_discover(pvp, pdp);
+
+ if (strcmp(pvp->pv_desc.dtvd_name, "kinst") == 0) {
+ dtrace_kinst_probedesc_t pd;
+
+ if (dtp->dt_kinstfd == -1) {
+ int fd;
+
+ fd = open("/dev/dtrace/kinst", O_WRONLY);
+ if (fd < 0) {
+ (void) dt_set_errno(dtp, errno);
+ return (NULL);
+ }
+ dtp->dt_kinstfd = fd;
+ }
+ memset(&pd, 0, sizeof(pd));
+ strlcpy(pd.kpd_func, pdp->dtpd_func,
+ sizeof (pd.kpd_func));
+
+ if (n_is_glob)
+ pd.kpd_off = -1;
+ else
+ pd.kpd_off = strtol(pdp->dtpd_name, NULL, 10);
+ if (ioctl(dtp->dt_kinstfd, KINSTIOC_MAKEPROBE, &pd) !=
+ 0) {
+ (void) dt_set_errno(dtp, errno);
+ return (NULL);
+ }
+ }
}
/*
diff --git a/cddl/lib/libavl/Makefile b/cddl/lib/libavl/Makefile
index b5e3b458f982..6a39e342bafc 100644
--- a/cddl/lib/libavl/Makefile
+++ b/cddl/lib/libavl/Makefile
@@ -2,7 +2,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/avl
-PACKAGE= runtime
+PACKAGE= zfs
LIB= avl
LIBADD= spl
SRCS= avl.c
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index f95517f10ebb..651609409a3a 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -84,6 +84,7 @@ CFLAGS+= -DHAVE_ISSETUGID
CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
-I${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} \
+ -I${SRCTOP}/sys/cddl/dev/kinst \
-I${SRCTOP}/sys/cddl/compat/opensolaris \
-I${SRCTOP}/cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
diff --git a/cddl/lib/libdtrace/regs_x86.d b/cddl/lib/libdtrace/regs_x86.d
index 3f625f9f4445..4140c133b53e 100644
--- a/cddl/lib/libdtrace/regs_x86.d
+++ b/cddl/lib/libdtrace/regs_x86.d
@@ -80,11 +80,11 @@ inline int R_R0 = R_EAX;
inline int R_R1 = R_EBX;
#pragma D binding "1.0" R_R1
-inline int R_RSP = 18 + 1 + 20;
+inline int R_RSP = 18 + 1 + 24;
#pragma D binding "1.0" R_RSP
-inline int R_RFL = 18 + 1 + 19;
+inline int R_RFL = 18 + 1 + 23;
#pragma D binding "1.0" R_RFL
-inline int R_RIP = 18 + 1 + 17;
+inline int R_RIP = 18 + 1 + 21;
#pragma D binding "1.0" R_RIP
inline int R_RAX = 18 + 1 + 14;
#pragma D binding "1.0" R_RAX
diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d
index afcfdfadaf1e..0ceb4021a16d 100644
--- a/cddl/lib/libdtrace/tcp.d
+++ b/cddl/lib/libdtrace/tcp.d
@@ -204,7 +204,7 @@ typedef struct tcpinfoh {
#pragma D binding "1.6.3" translator
translator csinfo_t < struct tcpcb *p > {
cs_addr = NULL;
- cs_cid = (uint64_t)(p == NULL ? 0 : p->t_inpcb);
+ cs_cid = (uint64_t)(p == NULL ? 0 : &p->t_inpcb);
cs_pid = 0;
cs_zoneid = 0;
};
@@ -214,16 +214,16 @@ translator tcpsinfo_t < struct tcpcb *p > {
tcps_addr = (uintptr_t)p;
tcps_local = -1; /* XXX */
tcps_active = -1; /* XXX */
- tcps_lport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_lport);
- tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_fport);
+ tcps_lport = p == NULL ? 0 : ntohs(p->t_inpcb.inp_inc.inc_ie.ie_lport);
+ tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb.inp_inc.inc_ie.ie_fport);
tcps_laddr = p == NULL ? "<unknown>" :
- p->t_inpcb->inp_vflag == INP_IPV4 ?
- inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
- inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id6_addr);
+ p->t_inpcb.inp_vflag == INP_IPV4 ?
+ inet_ntoa(&p->t_inpcb.inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
+ inet_ntoa6(&p->t_inpcb.inp_inc.inc_ie.ie_dependladdr.id6_addr);
tcps_raddr = p == NULL ? "<unknown>" :
- p->t_inpcb->inp_vflag == INP_IPV4 ?
- inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
- inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id6_addr);
+ p->t_inpcb.inp_vflag == INP_IPV4 ?
+ inet_ntoa(&p->t_inpcb.inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
+ inet_ntoa6(&p->t_inpcb.inp_inc.inc_ie.ie_dependfaddr.id6_addr);
tcps_state = p == NULL ? -1 : p->t_state;
tcps_iss = p == NULL ? 0 : p->iss;
tcps_irs = p == NULL ? 0 : p->irs;
@@ -250,9 +250,9 @@ translator tcpsinfo_t < struct tcpcb *p > {
tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0;
tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */
tcps_debug = p == NULL ? 0 :
- p->t_inpcb->inp_socket->so_options & 1;
+ p->t_inpcb.inp_socket->so_options & 1;
tcps_cookie = p == NULL ? -1 :
- p->t_inpcb->inp_socket->so_user_cookie;
+ p->t_inpcb.inp_socket->so_user_cookie;
tcps_dupacks = p == NULL ? -1 : p->t_dupacks;
tcps_rtttime = p == NULL ? -1 : p->t_rtttime;
tcps_rtseq = p == NULL ? -1 : p->t_rtseq;
diff --git a/cddl/lib/libicp/Makefile b/cddl/lib/libicp/Makefile
index 58ebb292c946..d00a47f2529a 100644
--- a/cddl/lib/libicp/Makefile
+++ b/cddl/lib/libicp/Makefile
@@ -2,7 +2,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp
-PACKAGE= utilities
+PACKAGE= zfs
LIB= icp
LIBADD=
@@ -116,4 +116,6 @@ CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
+LDFLAGS.bfd+= -Wl,-znoexecstack
+
.include <bsd.lib.mk>
diff --git a/cddl/lib/libicp_rescue/Makefile b/cddl/lib/libicp_rescue/Makefile
index 1237b1b05edf..6c6c3998f85c 100644
--- a/cddl/lib/libicp_rescue/Makefile
+++ b/cddl/lib/libicp_rescue/Makefile
@@ -109,4 +109,6 @@ CFLAGS.b3_ppc64le_sse2.S = -DLOCORE
CFLAGS.b3_ppc64le_sse41.S = -DLOCORE
+LDFLAGS.bfd+= -Wl,-znoexecstack
+
.include <bsd.lib.mk>
diff --git a/cddl/lib/libnvpair/Makefile b/cddl/lib/libnvpair/Makefile
index d436b9b1df27..8a7dd0093cf1 100644
--- a/cddl/lib/libnvpair/Makefile
+++ b/cddl/lib/libnvpair/Makefile
@@ -7,7 +7,7 @@
LIB= nvpair
LIBADD= spl
-PACKAGE= runtime
+PACKAGE= zfs
# user
INCS= libnvpair.h
SRCS= libnvpair.c \
diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile
index 6a918c59e27e..a06eef0b796c 100644
--- a/cddl/lib/libspl/Makefile
+++ b/cddl/lib/libspl/Makefile
@@ -8,7 +8,7 @@
LIB= spl
LIBADD=
-PACKAGE= runtime
+PACKAGE= zfs
SRCS = \
assert.c \
diff --git a/cddl/lib/libtpool/Makefile b/cddl/lib/libtpool/Makefile
index 637385bc842e..d6a1d9fcfb7c 100644
--- a/cddl/lib/libtpool/Makefile
+++ b/cddl/lib/libtpool/Makefile
@@ -6,7 +6,7 @@
LIB= tpool
LIBADD= spl
-PACKAGE= runtime
+PACKAGE= zfs
INCS= thread_pool_impl.h
SRCS= thread_pool.c
diff --git a/cddl/lib/libumem/Makefile b/cddl/lib/libumem/Makefile
index ca8f5e665920..4e4ef2e69461 100644
--- a/cddl/lib/libumem/Makefile
+++ b/cddl/lib/libumem/Makefile
@@ -2,7 +2,7 @@
.PATH: ${SRCTOP}/cddl/compat/opensolaris/lib/libumem
-PACKAGE= runtime
+PACKAGE= zfs
LIB= umem
SRCS= umem.c
WARNS?= 3
diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile
index 169b8d8afe01..b67b88037246 100644
--- a/cddl/lib/libuutil/Makefile
+++ b/cddl/lib/libuutil/Makefile
@@ -2,7 +2,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libuutil
-PACKAGE= runtime
+PACKAGE= zfs
LIB= uutil
SRCS=\
uu_alloc.c \
@@ -10,7 +10,6 @@ SRCS=\
uu_ident.c \
uu_list.c \
uu_misc.c \
- uu_pname.c \
uu_string.c
WARNS?= 2
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index 63bfcb39d4d8..2551b9ebdd57 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -9,7 +9,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd
.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib
-PACKAGE= runtime
+PACKAGE= zfs
LIB= zfs
LIBADD= \
avl \
diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile
index 5a7475f55428..f34494f1cc0a 100644
--- a/cddl/lib/libzfs_core/Makefile
+++ b/cddl/lib/libzfs_core/Makefile
@@ -8,7 +8,7 @@
LIB= zfs_core
LIBADD= nvpair spl zutil
-PACKAGE= runtime
+PACKAGE= zfs
INCS= libzfs_core.h
SRCS= libzfs_core.c \
diff --git a/cddl/lib/libzfsbootenv/Makefile b/cddl/lib/libzfsbootenv/Makefile
index be39af96124a..6c1643039514 100644
--- a/cddl/lib/libzfsbootenv/Makefile
+++ b/cddl/lib/libzfsbootenv/Makefile
@@ -3,7 +3,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfsbootenv
.PATH: ${SRCTOP}/sys/contrib/openzfs/include
-PACKAGE= runtime
+PACKAGE= zfs
LIB= zfsbootenv
SHLIB_MAJOR= 1
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 92f1bda6d82a..aeb2b4175a3b 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -32,6 +32,7 @@ ATOMIC_SRCS= opensolaris_atomic.c
PICFLAG= -fPIC
.endif
+PACKAGE= zfs
LIB= zpool
USER_C = \
@@ -119,7 +120,6 @@ KERNEL_C = \
sha256.c \
skein_zfs.c \
spa.c \
- spa_boot.c \
spa_checkpoint.c \
spa_config.c \
spa_errlog.c \
@@ -287,6 +287,10 @@ CSTD= c99
CFLAGS+= -g -DDEBUG=1
+# Pointer values are used as debugging "tags" to mark reference count
+# ownerships and in some cases the tag reference is dropped after an
+# object is freed.
+CFLAGS.dbuf.c= ${NO_WUSE_AFTER_FREE}
CFLAGS.entropy_common.c= -fno-tree-vectorize
CFLAGS.entropy_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
CFLAGS.error_private.c= -fno-tree-vectorize
diff --git a/cddl/lib/libzutil/Makefile b/cddl/lib/libzutil/Makefile
index 2e6b53658b22..3c3855898a77 100644
--- a/cddl/lib/libzutil/Makefile
+++ b/cddl/lib/libzutil/Makefile
@@ -6,7 +6,7 @@
LIB= zutil
LIBADD= avl geom m tpool
-PACKAGE= runtime
+PACKAGE= zfs
INCS = zutil_import.h
diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile
index cf43802090dd..c35a8a6bd615 100644
--- a/cddl/lib/pam_zfs_key/Makefile
+++ b/cddl/lib/pam_zfs_key/Makefile
@@ -1,7 +1,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key
.PATH: ${SRCTOP}/sys/contrib/openzfs/include
-PACKAGE= utilities
+PACKAGE= zfs
LIB= pam_zfs_key
SHLIBDIR?= /usr/lib
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 6a6ef62e4fce..0babca17e98a 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -7,7 +7,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/man/man8
.PATH: ${ZFSTOP}/module/os/freebsd/spl
-PACKAGE= runtime
+PACKAGE= zfs
PROG= zfs
MAN= \
zfs.8 \
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index 4c2a8b94de19..7020439a4366 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -10,7 +10,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd/zpool/os/freebsd
-PACKAGE= runtime
+PACKAGE= zfs
PROG= zpool
MAN= \
spl.4 \
diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile
index 255f4a3542b3..da180b10e733 100644
--- a/cddl/share/zfs/compatibility.d/Makefile
+++ b/cddl/share/zfs/compatibility.d/Makefile
@@ -4,6 +4,8 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd/zpool/compatibility.d
+PACKAGE= zfs
+
FILES= \
compat-2018 \
compat-2019 \
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index fcc472c24214..1e25b38d4eea 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -5,6 +5,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd/zinject
.PATH: ${ZFSTOP}/man/man8
+PACKAGE= zfs
PROG= zinject
INCS= zinject.h
SRCS= zinject.c translate.c
diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index 6296390592b3..537dde424f8f 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -5,6 +5,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd/zstream
.PATH: ${ZFSTOP}/man/man8
+PACKAGE= zfs
PROG= zstream
MAN= zstream.8
MLINKS= zstream.8 zstreamdump.8
@@ -13,6 +14,7 @@ SRCS= \
zstream.c \
zstream_decompress.c \
zstream_dump.c \
+ zstream_recompress.c \
zstream_redup.c \
zstream_token.c
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 91118d13775d..3778cd1316d4 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -7,6 +7,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd
.PATH: ${ZFSTOP}/man/man1
+PACKAGE= zfs
PROG= ztest
MAN= ztest.1
diff --git a/cddl/usr.sbin/dtrace/tests/amd64/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/Makefile
index 39ccd333bedf..db421ea0880f 100644
--- a/cddl/usr.sbin/dtrace/tests/amd64/Makefile
+++ b/cddl/usr.sbin/dtrace/tests/amd64/Makefile
@@ -1,7 +1,8 @@
# $FreeBSD$
TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/amd64
-TESTS_SUBDIRS+= arrays
+TESTS_SUBDIRS+= arrays \
+ kinst
.PATH: ${.CURDIR:H:H:H:H:H}/tests
KYUAFILE= YES
diff --git a/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile b/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile
new file mode 100644
index 000000000000..52568df07e07
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/amd64/kinst/Makefile
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+#
+# This Makefile was generated by $srcdir/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh.
+#
+
+PACKAGE= tests
+
+${PACKAGE}FILES= \
+ tst.basic.ksh \
+
+TESTEXES= \
+
+
+CFILES= \
+
+
+
+.include "../../dtrace.test.mk"
diff --git a/cddl/usr.sbin/dwatch/dwatch.1 b/cddl/usr.sbin/dwatch/dwatch.1
index d5595a530c0e..8714104ca6c8 100644
--- a/cddl/usr.sbin/dwatch/dwatch.1
+++ b/cddl/usr.sbin/dwatch/dwatch.1
@@ -68,7 +68,7 @@ utility uses
.Xr dtrace 1
to display process info when a given DTrace probe point is triggered.
Only the root user or users with
-.Xr sudo 8
+.Xr sudo 8 Pq Pa ports/security/sudo
access can run this command.
.Pp
.Nm
diff --git a/cddl/usr.sbin/dwatch/libexec/Makefile b/cddl/usr.sbin/dwatch/libexec/Makefile
index 581556eeebd0..40d284ae456f 100644
--- a/cddl/usr.sbin/dwatch/libexec/Makefile
+++ b/cddl/usr.sbin/dwatch/libexec/Makefile
@@ -22,6 +22,7 @@ FILES= chmod \
vop_rename \
vop_symlink
+LINKMODE= ${SHAREMODE}
LINKS= ${LIBEXECDIR}/dwatch/chmod ${LIBEXECDIR}/dwatch/fchmodat
LINKS+= ${LIBEXECDIR}/dwatch/chmod ${LIBEXECDIR}/dwatch/lchmod
LINKS+= ${LIBEXECDIR}/dwatch/io ${LIBEXECDIR}/dwatch/io-done
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index efd8c746128f..3be2dea0bb95 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -5,6 +5,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
.PATH: ${ZFSTOP}/cmd/zdb
.PATH: ${ZFSTOP}/man/man8
+PACKAGE= zfs
PROG= zdb
MAN= zdb.8
INCS= zdb.h
diff --git a/cddl/usr.sbin/zfsd/Makefile b/cddl/usr.sbin/zfsd/Makefile
index 88eb9220a8cc..e263a47cb422 100644
--- a/cddl/usr.sbin/zfsd/Makefile
+++ b/cddl/usr.sbin/zfsd/Makefile
@@ -4,6 +4,7 @@
.include "Makefile.common"
+PACKAGE= zfs
PROG_CXX= zfsd
MAN= zfsd.8
diff --git a/cddl/usr.sbin/zfsd/zfsd.cc b/cddl/usr.sbin/zfsd/zfsd.cc
index 876cca836e9e..29c6b1ae22e2 100644
--- a/cddl/usr.sbin/zfsd/zfsd.cc
+++ b/cddl/usr.sbin/zfsd/zfsd.cc
@@ -276,7 +276,7 @@ ZfsDaemon::RescanSystem()
result = geom_gettree(&mesh);
if (result != 0) {
syslog(LOG_ERR, "ZfsDaemon::RescanSystem: "
- "geom_gettree faild with error %d\n", result);
+ "geom_gettree failed with error %d\n", result);
return;
}
diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile
index ffac0785d18d..faedd5bc7d2b 100644
--- a/cddl/usr.sbin/zhack/Makefile
+++ b/cddl/usr.sbin/zhack/Makefile
@@ -2,6 +2,7 @@
.PATH: ${SRCTOP}/sys/contrib/openzfs/cmd
+PACKAGE= zfs
PROG= zhack
MAN=