freebsd-dev/sys/cddl/dev/fbt
Robert Watson 30b68ecda8 Changes that improve DTrace FBT reliability on freebsd/arm64:
- Implement a dtrace_getnanouptime(), matching the existing
  dtrace_getnanotime(), to avoid DTrace calling out to a potentially
  instrumentable function.

  (These should probably both be under KDTRACE_HOOKS.  Also, it's not clear
  to me that they are correct implementations for the DTrace thread time
  functions they are used in .. fixes for another commit.)

- Don't allow FBT to instrument functions involved in EL1 exception handling
  that are involved in FBT trap processing: handle_el1h_sync() and
  do_el1h_sync().

- Don't allow FBT to instrument DDB and KDB functions, as that makes it
  rather harder to debug FBT problems.

Prior to these changes, use of FBT on FreeBSD/arm64 rapidly led to kernel
panics due to recursion in DTrace.

Reliable FBT on FreeBSD/arm64 is reliant on another change from @andrew to
have the aarch64 instrumentor more carefully check that instructions it
replaces are against the stack pointer, which can otherwise lead to memory
corruption.  That change remains under review.

MFC after:	2 weeks
Reviewed by:	andrew, kp, markj (earlier version), jrtc27 (earlier version)
Differential revision:	https://reviews.freebsd.org/D27766
2021-01-11 15:42:22 +00:00
..
aarch64 Changes that improve DTrace FBT reliability on freebsd/arm64: 2021-01-11 15:42:22 +00:00
arm dtrace/fbt: fix return probe arguments on arm 2020-07-21 07:41:36 +00:00
mips
powerpc powerpc/dtrace: Fix fbt function probing for ELFv2 2019-05-27 03:18:56 +00:00
riscv dtrace: fix fbt return probes on RISC-V 2020-09-11 09:15:49 +00:00
x86
fbt.c Changes that improve DTrace FBT reliability on freebsd/arm64: 2021-01-11 15:42:22 +00:00
fbt.h