dtrace: do not overload libproc flags
authorEric van Gyzen <vangyzen@FreeBSD.org>
Tue, 25 Jul 2023 16:59:07 +0000 (11:59 -0500)
committerEric van Gyzen <vangyzen@FreeBSD.org>
Tue, 1 Aug 2023 17:28:50 +0000 (12:28 -0500)
commitbcbce2a29b892ac10291f652b271963e08d641a8
tree0cd4bcd5c52ef52339b66e8f2d8af8111335aa72
parent837f6ecd88ee6c4285c088f4f0ddbf637889a130
dtrace: do not overload libproc flags

dtrace stored its PR_RLC and PR_KLC flags in the proc_handle's flags,
where they collided with PATTACH_FORCE and PATTACH_RDONLY, respectively.
Thus, Psetflags(PR_KLC) effectively also set the PATTACH_RDONLY flag.

Since the flags are private to dtrace (at least on FreeBSD), store them in
dtrace's own dt_proc structure instead.

On FreeBSD, either PR_RLC or PR_KLC was always set, so remove code that
would handle the case where neither was set.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D41121
cddl/compat/opensolaris/include/libproc.h
cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.h
cddl/lib/libdtrace/libproc_compat.h