freebsd-dev/sys
Christos Margiolis f0bc4ed144 kinst: Initial revision
This is a new DTrace provider which allows arbitrary kernel instructions
to be traced.  Currently it is implemented only for amd64.

kinst probes are created on demand by libdtrace, and there is a probe
for each kernel instruction.  Probes are named
kinst:<module>:<function>:<offset>, where "offset" is the offset of the
target instruction relative to the beginning of the function.  Omitting
"offset" causes all instructions in the function to be traced.

kinst works similarly to FBT in that it places a breakpoint on the
target instruction and hooks into the kernel breakpoint handler.
Because kinst has to be able to trace arbitrary instructions, it does
not emulate most of them in software but rather causes the traced thread
to execute a copy of the instruction before returning to the original
code.

The provider is quite low-level and as-is will be useful mostly only to
kernel developers.  However, it provides a great deal of visibility into
kernel code execution and could be used as a building block for
higher-level tooling which can in some sense translate between C sources
and generated machine code.  In particular, the "regs" variable recently
added to D allows the CPU's register file to be accessed from kinst
probes.

kinst is experimental and should not be used on production systems for
now.

In collaboration with:	markj
Sponsored by:		Google, Inc. (GSoC 2022)
MFC after:		3 months
Differential Revision:	https://reviews.freebsd.org/D36851
2022-10-11 18:19:08 -04:00
..
amd64 amd64 pmap: add comment explaining why INVLPG is functional for PCID config 2022-10-11 00:33:17 +03:00
arm sys: Consolidate common implementation details of PV entries. 2022-10-07 10:14:03 -07:00
arm64 Add more Arm CPUs to the arm64 cpu ident 2022-10-11 14:01:16 +01:00
bsm
cam cam: Use FreeBSD standard copyright 2022-10-07 23:37:46 -06:00
cddl kinst: Initial revision 2022-10-11 18:19:08 -04:00
compat LinuxKPI: Add pci_power querying for drm-kmod 2022-10-06 10:15:41 +02:00
conf Fix the options to build rk_usb2phy.c 2022-10-06 14:30:18 +01:00
contrib zfs: mix mismerge in zfs_znode_free 2022-10-08 20:43:33 +00:00
crypto Fix the IV length in the armv8 AES GCM code 2022-09-06 13:11:04 +01:00
ddb Fix kernel build after 754cb545b6 . 2022-10-04 17:13:17 +02:00
dev nvme: Always set deadline to max 2022-10-11 12:51:32 -06:00
dts
fs fusefs: during F_GETLK, don't change l_pid if no lock is found 2022-10-07 09:09:21 -06:00
gdb
geom
gnu
i386 sys: Consolidate common implementation details of PV entries. 2022-10-07 10:14:03 -07:00
isa
kern listen(): improve POSIX compliance 2022-10-11 22:46:51 +02:00
kgssapi
libkern qdivrem: Predict division by zero as false. 2022-10-04 13:51:06 +02:00
modules kinst: Initial revision 2022-10-11 18:19:08 -04:00
net pf: atomically increment state ids 2022-10-08 18:27:29 +02:00
net80211 net80211: move IEEE80211_F_WME check to vap for consistency 2022-09-29 12:54:23 +00:00
netgraph Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
netinet inet: Simplify if_multiaddrs iteration. 2022-10-08 13:10:07 -04:00
netinet6 tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
netipsec tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
netlink netlink: make it working without INET6 2022-10-04 14:39:49 -07:00
netpfil pf: atomically increment state ids 2022-10-08 18:27:29 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ibcore: The use of IN_LOOPBACK() now requires a valid VNET context. 2022-09-23 13:42:03 +02:00
opencrypto opencrypto: mark INVARIANTS variables as __diagused 2022-08-10 15:35:29 -04:00
powerpc powerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag 2022-10-03 20:56:41 -03:00
riscv riscv: handle misaligned address exceptions 2022-10-11 10:39:50 -03:00
rpc nfsd: Allow multiple instances of rpc.tlsservd 2022-08-22 13:54:24 -07:00
security Bump MAC_VERSION to 5 2022-10-07 15:24:32 +00:00
sys atomic: Style 2022-10-11 18:19:08 -04:00
teken
tests
tools Make #if and #endif do what people expect in *_if.m 2022-10-06 14:35:31 +01:00
ufs Updates to UFS/FFS superblock integrity checks when reading a superblock. 2022-10-03 05:53:10 -07:00
vm vm_page: Fix a logic error in the handling of PQ_ACTIVE operations 2022-10-05 15:12:46 -04:00
x86 Fix various places which cast a pointer to a vm_paddr_t or vice versa. 2022-10-03 16:10:41 -07:00
xdr
xen
Makefile