freebsd-dev/sys
John Baldwin f2dceb474b Make stack_save*() more robust on MIPS.
- Validate any stack addresses read from against td_kstack before
  reading.  If an unwind operation would attempt to read outside the
  bounds of td_kstack, abort the unwind instead.

- For stack_save_td(), don't use the PC and SP from the current
  thread, instead read the PC and SP from pcb_context[].

- For stack_save(), use the current PC and SP of the current thread,
  not the values from pcb_regs (the horribly named td_frame of the
  outermost trapframe).  The result was that stack_trace() never
  logged _any_ kernel frames but only the frame from the saved
  userspace registers on entry from the kernel.

- Inline the one use of stack_register_fetch().

- Add a VALID_PC() helper macro and simplify types to remove
  excessive casts in stack_capture().

- Fix stack_capture() to work on compilers written in this century.
  Don't treat function epilogues as function prologues by skipping
  additions to SP when searching for a function start.

- Add some comments to stack_capture() and fix some style bugs.

Reviewed by:	arichardson
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D27358
2020-12-01 17:17:22 +00:00
..
amd64 Add VT driver for VBE framebuffer device 2020-11-30 08:22:40 +00:00
arm Remove duplicated SV_ASLR from the elf flags. 2020-12-01 09:18:18 +00:00
arm64 arm64: Do not rely on SPCR table to detect acpi 2020-11-26 20:22:34 +00:00
bsm
cam mmccam: Convert some printf to CAM_DEBUG 2020-11-30 14:49:13 +00:00
cddl Add a kstack_contains() helper function. 2020-12-01 17:04:46 +00:00
compat Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. 2020-11-30 09:47:53 +00:00
conf Add VT driver for VBE framebuffer device 2020-11-30 08:22:40 +00:00
contrib Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
crypto Check cipher key lengths during probesession. 2020-11-05 23:31:58 +00:00
ddb Add a kstack_contains() helper function. 2020-12-01 17:04:46 +00:00
dev Always use the __unused attribute even for potentially unused parameters. 2020-12-01 08:52:13 +00:00
dts
fs Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
gdb
geom Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
gnu
i386 Add VT driver for VBE framebuffer device 2020-11-30 08:22:40 +00:00
isa
kern vmem: Revert r364744 2020-12-01 16:06:31 +00:00
kgssapi
libkern
mips Make stack_save*() more robust on MIPS. 2020-12-01 17:17:22 +00:00
modules qat: Fix firmware module autoloading 2020-11-30 20:53:25 +00:00
net net: Revert vnet/epair cleanup race mitigation 2020-12-01 16:34:43 +00:00
net80211 net80211: fix a typo 2020-11-04 12:07:33 +00:00
netgraph ng_nat: unbreak ABI 2020-11-10 02:26:44 +00:00
netinet Remove RADIX_MPATH config option. 2020-11-29 19:43:33 +00:00
netinet6 Remove RADIX_MPATH config option. 2020-11-29 19:43:33 +00:00
netipsec Trigger soft lifetime expiration on sequence number 2020-10-16 11:27:01 +00:00
netpfil pf: Make tag hashing more robust 2020-11-24 16:18:47 +00:00
netsmb
nfs
nfsclient
nfsserver nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nlm
ofed Fix for referencing file via its vnode in ibore. 2020-11-02 10:44:29 +00:00
opencrypto Remove the cloned file descriptors for /dev/crypto. 2020-11-25 00:10:54 +00:00
powerpc Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
riscv Add a kstack_contains() helper function. 2020-12-01 17:04:46 +00:00
rpc
security pipe: allow for lockless pipe_stat 2020-11-19 06:30:25 +00:00
sys Add a kstack_contains() helper function. 2020-12-01 17:04:46 +00:00
teken
tests
tools
ufs ffs: do not read full direct blocks if they are going to be overwritten. 2020-11-30 17:03:26 +00:00
vm uma: Avoid allocating buckets with the cross-domain lock held 2020-11-30 16:18:33 +00:00
x86 Add a kstack_contains() helper function. 2020-12-01 17:04:46 +00:00
xdr
xen
Makefile