From nobody Wed Oct 09 09:17:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XNnNG4PT3z5Z316; Wed, 09 Oct 2024 09:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XNnNG3qPyz4G4L; Wed, 9 Oct 2024 09:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728465454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yccdoj/uJvc1fHfTVOgGO7KqOPP4rfnKahtnLTejq0=; b=W00Z3QmVes1AzVADCtlwxhhru4rX+IYU6sZISrMnyhqaIQtxtw10HScRnqZzCrCFsrOOIb wUftGuDnCDaPImyHMk12aZhZSkO7Z6fjni13TgqahtwfSM0ahW4ju/WtTjeBvDz3BwQess Rm/IWyFeifRk5cLF4pwdFqdxasNf2KK6qiWa/rf/gdMGsLz8crpDiC4t4gM4zCGMjpRgDw VrlCZDVpP0w/minvLphj00UolMKxjGJn+Wx/Osv5Qz5AlV2cP3DdT8Ai8uw8lW8DC9jJqp 8f/stNeQGRVPfGzVTTHJq30FY1oa0UBDnCS0o3zQAVAaPdTXuXNfVBGpN6wYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728465454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yccdoj/uJvc1fHfTVOgGO7KqOPP4rfnKahtnLTejq0=; b=vqMA3NwWbvMaDcT7oz47hZpFm4OTvxsmIbBhD0ESqo6ijo1LBehH7drO3pepg4x7z71LPn NqgfMqkNM39WyyrMDc1AC5Uilfz+fzfULvq37+lAymws5wRT9FotzF018MpBaijN6V933q VdZjCUnYLZ9IjQd0mMG8SP0MDUFne/yjOYCDbjU1J6kY1S0kgki71zM9Kpoyo9HhXuC2tD qkAg01tCfor9SjUWgdP2sGXCwRBkgG4TA3IplTr/37mTQMOuWME7AROPCGcy7WF1f2dbbh SpGbfDk+UKVpJYDXXZEyFy66dzJmU67xuCr+4C9B/uwG4DIRTk2CS+MEq1LsEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728465454; a=rsa-sha256; cv=none; b=uePd2915vxmaTHiivgBh2kIi69+HbrSsJQ8rc9Kf4S8fSI7aArASWnpHbFKP/Ac/UCJffW axtkjC4p0gMJk4EWi4f7q8hWkeFqHautr+JEI6hf32+NE9mssDYajnLNOJG6eThWuZ+J3k 47Fzug0QFnCFUjrPOiwu+eeJeRUOtyhbwjIvwoTebVPjojs6aN9j5R1UecG4oL2yhvjhQV sSJNxxkK+4aykbjQopKn6uYg/++I9RhD2WQILAuxIe6RoSd8CRHMAa92Jijala+PPWI7Xk rMv6w2vzfUn1nQGek+LNCmBeFclIgRzi2L6C+tV2DJgppx3eP1hnCFeU7jdvPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XNnNG3R9Zz17XR; Wed, 9 Oct 2024 09:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4999HYg6018551; Wed, 9 Oct 2024 09:17:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4999HYuY018548; Wed, 9 Oct 2024 09:17:34 GMT (envelope-from git) Date: Wed, 9 Oct 2024 09:17:34 GMT Message-Id: <202410090917.4999HYuY018548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0d4081ed6914 - stable/14 - sys: add conf/std.debug, generic debugging options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0d4081ed69147a2591dfc8b89cba42dc6a2ce757 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d4081ed69147a2591dfc8b89cba42dc6a2ce757 commit 0d4081ed69147a2591dfc8b89cba42dc6a2ce757 Author: Kristof Provost AuthorDate: 2024-04-23 21:11:24 +0000 Commit: Kristof Provost CommitDate: 2024-10-09 08:44:35 +0000 sys: add conf/std.debug, generic debugging options The new sys/conf/std.debug contains the list of debugging options enabled by default in -CURRENT, so they don't need to be listed individually in every kernel config. Introduce *-DEBUG variants of the major kernel configs. (cherry picked and modified from commit 4f8f9d708e6a4143f3b178bfab10d0a9b75ba2fe) Reviewed by: markj, imp, olce (previous version) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46871 --- sys/amd64/conf/GENERIC-DEBUG | 9 +++++++++ sys/amd64/conf/MINIMAL-DEBUG | 9 +++++++++ sys/amd64/conf/NOTES | 11 +++++++++++ sys/arm/conf/GENERIC-DEBUG | 9 +++++++++ sys/arm64/conf/GENERIC-DEBUG | 9 +++++++++ sys/conf/std.debug | 29 +++++++++++++++++++++++++++++ sys/i386/conf/GENERIC-DEBUG | 9 +++++++++ sys/powerpc/conf/GENERIC-DEBUG | 9 +++++++++ sys/powerpc/conf/GENERIC64-DEBUG | 9 +++++++++ sys/powerpc/conf/GENERIC64LE-DEBUG | 9 +++++++++ sys/riscv/conf/GENERIC-DEBUG | 9 +++++++++ 11 files changed, 121 insertions(+) diff --git a/sys/amd64/conf/GENERIC-DEBUG b/sys/amd64/conf/GENERIC-DEBUG new file mode 100644 index 000000000000..f7187677370b --- /dev/null +++ b/sys/amd64/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# 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 index 000000000000..a2533608f8af --- /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 index c82be3945ac7..db93a47165d6 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -153,3 +153,14 @@ 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 KMSAN # Kernel Memory Sanitizer diff --git a/sys/arm/conf/GENERIC-DEBUG b/sys/arm/conf/GENERIC-DEBUG new file mode 100644 index 000000000000..f36fe21b1640 --- /dev/null +++ b/sys/arm/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# 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 index 000000000000..d954106b58db --- /dev/null +++ b/sys/arm64/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# 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 index 000000000000..813aa0e4af91 --- /dev/null +++ b/sys/conf/std.debug @@ -0,0 +1,29 @@ +# +# std.debug -- Enable debug options for -CURRENT. +# + +options BUF_TRACKING # Track buffer history +#options FULL_BUF_TRACKING # Track more 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 +#options DEBUG_VFS_LOCKS + +# Net80211 debugging +options IEEE80211_DEBUG + +# USB debugging +options USB_DEBUG +options HID_DEBUG + +# CAM debugging +options CAMDEBUG diff --git a/sys/i386/conf/GENERIC-DEBUG b/sys/i386/conf/GENERIC-DEBUG new file mode 100644 index 000000000000..a988096e019e --- /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/powerpc/conf/GENERIC-DEBUG b/sys/powerpc/conf/GENERIC-DEBUG new file mode 100644 index 000000000000..6388aaaffb55 --- /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 index 000000000000..5e0d43941200 --- /dev/null +++ b/sys/powerpc/conf/GENERIC64-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled 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 index 000000000000..97d308864313 --- /dev/null +++ b/sys/powerpc/conf/GENERIC64LE-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled 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 index 000000000000..ab16a6cc5cfa --- /dev/null +++ b/sys/riscv/conf/GENERIC-DEBUG @@ -0,0 +1,9 @@ +# +# GENERIC-DEBUG -- WITNESS and INVARIANTS enabled kernel configuration file +# for FreeBSD/RISC-V +# + +include GENERIC +include "std.debug" + +ident GENERIC-DEBUG