1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/tools
Eric van Gyzen 8c5a9161d1 Save the last callout function executed on each CPU
Save the last callout function pointer (and its argument) executed
on each CPU for inspection by a debugger.  Add a ddb `show callout_last`
command to show these pointers.  Add a kernel module that I used
for testing that command.

Relocate `ce_migration_cpu` to reduce padding and therefore preserve
the size of `struct callout_cpu` (320 bytes on amd64) despite the
added members.

This should help diagnose reference-after-free bugs where the
callout's mutex has already been freed when `softclock_call_cc`
tries to unlock it.

You might hope that the pointer would still be available, but it
isn't.  The argument to that function is on the stack (because
`softclock_call_cc` uses it later), and that might be enough in
some cases, but even then, it's very laborious.  A pointer to the
callout is saved right before these newly added fields, but that
callout might have been freed.  We still have the pointer to its
associated mutex, and the name within might be enough, but it might
also have been freed.

Reviewed by:	markj jhb
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20794
2019-07-03 19:22:44 +00:00
..
boot revert QEMU q35 platform use from r346748 2019-04-30 15:28:52 +00:00
bsdbox Fix bsdbox build WITH_OFED 2018-08-27 19:34:50 +00:00
build Also remove lib32 versions of libradius. 2019-07-03 09:14:39 +00:00
bus_space Add support for Python 3 and make it the default. 2019-06-30 02:29:12 +00:00
debugscripts
diag In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
ifnet
kerneldoc remove the removed-from-source drm/drm2 parts 2019-03-05 15:23:28 +00:00
LibraryReport
regression fsx: seed more randomly with the -S0 option 2019-04-28 17:27:06 +00:00
sched
test Save the last callout function executed on each CPU 2019-07-03 19:22:44 +00:00
tools Mount and unmount devfs around calls to add packages. 2019-06-21 03:49:36 +00:00
install.sh
make_libdeps.sh
README
tinder.sh

$FreeBSD$

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.