diff --git a/sys/amd64/conf/GENERIC-DEBUG b/sys/amd64/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/amd64/conf/GENERIC-DEBUG @@ -0,0 +1,10 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/amd64 +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG + diff --git a/sys/amd64/conf/MINIMAL-DEBUG b/sys/amd64/conf/MINIMAL-DEBUG new file mode 100644 --- /dev/null +++ b/sys/amd64/conf/MINIMAL-DEBUG @@ -0,0 +1,9 @@ +# +# MINIMAL-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/amd64 +# + +include MINIMAL +include "std.debug" + +ident MINIMAL-DEBUG diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -153,3 +153,15 @@ # 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/GENERIC-DEBUG b/sys/arm/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/arm/conf/GENERIC-DEBUG @@ -0,0 +1,10 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/ARMv6 +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG + diff --git a/sys/arm64/conf/GENERIC-DEBUG b/sys/arm64/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/arm64/conf/GENERIC-DEBUG @@ -0,0 +1,10 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/arm64 +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG + diff --git a/sys/conf/std.debug b/sys/conf/std.debug new file mode 100644 --- /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-DEBUG b/sys/i386/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/i386/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/i386 +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -84,6 +84,8 @@ # 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/powerpc/conf/GENERIC-DEBUG b/sys/powerpc/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/powerpc/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/powerpc +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG diff --git a/sys/powerpc/conf/GENERIC64-DEBUG b/sys/powerpc/conf/GENERIC64-DEBUG new file mode 100644 --- /dev/null +++ b/sys/powerpc/conf/GENERIC64-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS free kernel configuration file +# for FreeBSD/powerpc64 +# + +include GENERIC64 +include "std.debug" + +ident GENERIC64-DEBUG diff --git a/sys/powerpc/conf/GENERIC64LE-DEBUG b/sys/powerpc/conf/GENERIC64LE-DEBUG new file mode 100644 --- /dev/null +++ b/sys/powerpc/conf/GENERIC64LE-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS free kernel configuration file +# for FreeBSD/powerpc64le +# + +include GENERIC64LE +include "std.debug" + +ident GENERIC64LE-DEBUG diff --git a/sys/riscv/conf/GENERIC-DEBUG b/sys/riscv/conf/GENERIC-DEBUG new file mode 100644 --- /dev/null +++ b/sys/riscv/conf/GENERIC-DEBUG @@ -0,0 +1,10 @@ +# +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file +# for FreeBSD/RISC-V +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG +