svn commit: r359829 - in head/sys: amd64/conf conf
Conrad Meyer
cem at FreeBSD.org
Sun Apr 12 18:04:21 UTC 2020
Author: cem
Date: Sun Apr 12 18:04:20 2020
New Revision: 359829
URL: https://svnweb.freebsd.org/changeset/base/359829
Log:
Add queue(2) debug macros as build options
Add QUEUE_MACRO_DEBUG_TRACE and QUEUE_MACRO_DEBUG_TRASH as proper kernel
options. While here, alpha-sort the debug section of sys/conf/options.
Enable QUEUE_MACRO_DEBUG_TRASH in amd64 GENERIC (but not GENERIC-NODEBUG)
kernels. It is similar in nature and cost to other use-after-free pointer
trashing we do in GENERIC. It is probably reasonable to enable in any arch
GENERIC kernel that defines INVARIANTS.
Modified:
head/sys/amd64/conf/GENERIC
head/sys/amd64/conf/GENERIC-NODEBUG
head/sys/conf/NOTES
head/sys/conf/options
Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC Sun Apr 12 16:13:05 2020 (r359828)
+++ head/sys/amd64/conf/GENERIC Sun Apr 12 18:04:20 2020 (r359829)
@@ -96,6 +96,7 @@ options GDB # Support remote GDB.
options DEADLKRES # Enable the deadlock resolver
options INVARIANTS # Enable calls of extra sanity checking
options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
+options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation
options WITNESS # Enable checks to detect deadlocks and cycles
options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
Modified: head/sys/amd64/conf/GENERIC-NODEBUG
==============================================================================
--- head/sys/amd64/conf/GENERIC-NODEBUG Sun Apr 12 16:13:05 2020 (r359828)
+++ head/sys/amd64/conf/GENERIC-NODEBUG Sun Apr 12 18:04:20 2020 (r359829)
@@ -40,3 +40,4 @@ nooptions FULL_BUF_TRACKING
nooptions COVERAGE
nooptions KCOV
nooptions MALLOC_DEBUG_MAXZONES
+nooptions QUEUE_MACRO_DEBUG_TRASH
Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES Sun Apr 12 16:13:05 2020 (r359828)
+++ head/sys/conf/NOTES Sun Apr 12 18:04:20 2020 (r359829)
@@ -414,6 +414,18 @@ options DDB_NUMSYM
options GDB
#
+# Trashes list pointers when they become invalid (i.e., the element is
+# removed from a list). Relatively inexpensive to enable.
+#
+options QUEUE_MACRO_DEBUG_TRASH
+
+#
+# Stores information about the last caller to modify the list object
+# in the list object. Requires additional memory overhead.
+#
+options QUEUE_MACRO_DEBUG_TRACE
+
+#
# SYSCTL_DEBUG enables a 'sysctl' debug tree that can be used to dump the
# contents of the registered sysctl nodes on the console. It is disabled by
# default because it generates excessively verbose console output that can
Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options Sun Apr 12 16:13:05 2020 (r359828)
+++ head/sys/conf/options Sun Apr 12 18:04:20 2020 (r359829)
@@ -55,17 +55,19 @@ DDB_CAPTURE_DEFAULTBUFSIZE opt_ddb.h
DDB_CAPTURE_MAXBUFSIZE opt_ddb.h
DDB_CTF opt_ddb.h
DDB_NUMSYM opt_ddb.h
+EARLY_PRINTF opt_global.h
FULL_BUF_TRACKING opt_global.h
GDB
KDB opt_global.h
KDB_TRACE opt_kdb.h
KDB_UNATTENDED opt_kdb.h
KLD_DEBUG opt_kld.h
+NUM_CORE_FILES opt_global.h
+QUEUE_MACRO_DEBUG_TRACE opt_global.h
+QUEUE_MACRO_DEBUG_TRASH opt_global.h
SYSCTL_DEBUG opt_sysctl.h
-EARLY_PRINTF opt_global.h
TEXTDUMP_PREFERRED opt_ddb.h
TEXTDUMP_VERBOSE opt_ddb.h
-NUM_CORE_FILES opt_global.h
TSLOG opt_global.h
TSLOGSIZE opt_global.h
More information about the svn-src-all
mailing list