diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index f11601891ef..a49a5c006d7 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -94,25 +94,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options BUF_TRACKING # Track buffer history -options DDB # Support DDB. -options FULL_BUF_TRACKING # Track more buffer history -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 -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default - -# Kernel Sanitizers -#options COVERAGE # Generic kernel coverage. Used by KCOV -#options KCOV # Kernel Coverage Sanitizer -# Warning: KUBSAN can result in a kernel too large for loader to load -#options KUBSAN # Kernel Undefined Behavior Sanitizer -#options KCSAN # Kernel Concurrency Sanitizer +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index fb6d75a2ae1..c413590586e 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -78,6 +78,8 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +include ../../conf/std.debug # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/amd64/conf/MINIMAL-NODEBUG b/sys/amd64/conf/MINIMAL-NODEBUG new file mode 100644 index 00000000000..35281b2212d --- /dev/null +++ b/sys/amd64/conf/MINIMAL-NODEBUG @@ -0,0 +1,11 @@ +# +# MINIMAL-NODEBUG -- Non-debug MINIMAL kernel. +# +# This is the MINIMAL equivalent to GENERIC-NODEBUG. + +#NO_UNIVERSE + +include MINIMAL +include "../../conf/std.nodebug" + +ident MINIMAL-NODEBUG diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index 31db96e6d0e..a6f12aec7dc 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -159,3 +159,15 @@ options KSTACK_PAGES=5 # Enable detailed accounting by the PV entry allocator. options PV_STATS + +##################################################################### +# Kernel sanitizers + +#options COVERAGE # Generic kernel coverage. Used by KCOV +#options KCOV # Kernel Coverage Sanitizer +# Warning: KUBSAN can result in a kernel too large for loader to load +#options KUBSAN # Kernel Undefined Behavior Sanitizer +#options KCSAN # Kernel Concurrency Sanitizer +#options KASAN # Kernel Address Sanitizer +#options KCSAN # Kernel Concurrency Sanitizer +#options KMSAN # Kernel Memory Sanitizer diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index b4b83d66809..9ae37eab90d 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -63,18 +63,10 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +options USB_DEBUG # Enable usb debug support code + # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -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 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 -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options USB_DEBUG # Enable usb debug support code -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index 80b4e898bfd..72f22efd0c2 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -63,18 +63,10 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +options USB_DEBUG # Enable usb debug support code + # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -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 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 -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options USB_DEBUG # Enable usb debug support code -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Optional extras, never enabled by default: #options BOOTVERBOSE diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64 index 1b6b0e8b181..cb3c591947f 100644 --- a/sys/arm64/conf/std.arm64 +++ b/sys/arm64/conf/std.arm64 @@ -73,16 +73,7 @@ options PERTHREAD_SSP # Per-thread SSP canary options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -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 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 -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel Sanitizers #options COVERAGE # Generic kernel coverage. Used by KCOV diff --git a/sys/conf/std.debug b/sys/conf/std.debug new file mode 100644 index 00000000000..53789f269b8 --- /dev/null +++ b/sys/conf/std.debug @@ -0,0 +1,17 @@ +# +# std.debug -- Enable debug options for -CURRENT. +# + +options BUF_TRACKING # Track buffer history +options DDB # Support DDB. +options FULL_BUF_TRACKING # Track more buffer history +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 +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index b5898ed94b8..7bd01d4e60e 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -88,15 +88,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -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 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 -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index e27bb68e31f..b29a179d2bd 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -86,6 +86,8 @@ options INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +include ../../conf/std.debug # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/i386/conf/MINIMAL-NODEBUG b/sys/i386/conf/MINIMAL-NODEBUG new file mode 100644 index 00000000000..35281b2212d --- /dev/null +++ b/sys/i386/conf/MINIMAL-NODEBUG @@ -0,0 +1,11 @@ +# +# MINIMAL-NODEBUG -- Non-debug MINIMAL kernel. +# +# This is the MINIMAL equivalent to GENERIC-NODEBUG. + +#NO_UNIVERSE + +include MINIMAL +include "../../conf/std.nodebug" + +ident MINIMAL-NODEBUG diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index 47c84956fac..bb7865301fc 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -91,14 +91,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#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 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 -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 9d2de9c8095..b077cf3f2fe 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -101,14 +101,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#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 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 -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 6ca1a01e596..f090cd47ecf 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -97,14 +97,7 @@ options RCTL # Resource limits options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB -#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 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 -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default +include ../../conf/std.debug # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index ca71f7423cf..52edc01b5c8 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -156,17 +156,8 @@ device spigen options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. # For full debugger support use (turn off in stable branch): -options DDB # Support DDB. -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 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 -options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence +include "std.debug" # options EARLY_PRINTF=sbi -options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps