Changes from v1:
* Add actual .config fragment instead of just documenting it
* Note that these partially x86-specific, but the rest can be
used to test all tip contributions.
--
From: Dave Hansen <[email protected]>
The kernel has a wide variety of debugging options to help catch
and squash bugs. However, new debugging is added all the time and
the existing options can be hard to find.
Add a Kconfig fragment with the debugging options which tip
maintainers expect to be used to test contributions.
This should make it easier for contributors to test their code and
find issues before submission.
Signed-off-by: Dave Hansen <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
b/Documentation/process/maintainer-tip.rst | 14 ++++++++++++++
b/kernel/configs/x86_debug.config | 17 +++++++++++++++++
2 files changed, 31 insertions(+)
diff -puN Documentation/process/maintainer-tip.rst~0001-RFC-Documentation-process-Add-testing-section-to-tip Documentation/process/maintainer-tip.rst
--- a/Documentation/process/maintainer-tip.rst~0001-RFC-Documentation-process-Add-testing-section-to-tip 2022-03-31 10:52:55.718665861 -0700
+++ b/Documentation/process/maintainer-tip.rst 2022-03-31 10:52:55.722665862 -0700
@@ -437,6 +437,20 @@ in a private repository which allows int
series for testing. The usual way to offer this is a git URL in the cover
letter of the patch series.
+Testing
+^^^^^^^
+
+Code should be tested before submitting to the tip maintainers. Anything
+other than minor changes should be built, booted and tested with
+comprehensive (and heavyweight) kernel debugging options enabled.
+
+These debugging options can be found in kernel/configs/x86_debug.config
+and can be added to an existing kernel config by running:
+
+ make x86_debug.config
+
+Some of these options are x86-specific and can be left out when testing
+on other architectures.
Coding style notes
------------------
diff -puN /dev/null kernel/configs/x86_debug.config
--- /dev/null 2022-03-26 18:22:40.487999538 -0700
+++ b/kernel/configs/x86_debug.config 2022-03-31 10:53:10.318671042 -0700
@@ -0,0 +1,17 @@
+CONFIG_X86_DEBUG_FPU=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_VM_VMACACHE=y
+CONFIG_DEBUG_VM_RB=y
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_KMEMCHECK=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
+CONFIG_GCOV_KERNEL=y
+CONFIG_LOCKDEP=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_SCHEDSTATS=y
+CONFIG_VMLINUX_VALIDATION=y
_
On Thu, Mar 31, 2022 at 10:57:28AM -0700, Dave Hansen wrote:
>
> Changes from v1:
>
> * Add actual .config fragment instead of just documenting it
> * Note that these partially x86-specific, but the rest can be
> used to test all tip contributions.
Good, that looks nice. I'll queue it next week with this hunk added:
---
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 63d50f65b828..1abd7cc9d6cd 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -313,5 +313,6 @@ define archhelp
echo ''
echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
+ echo ' x86_debug.config - Enable tip tree debugging options for testing'
endef
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG Nürnberg
The following commit has been merged into the x86/build branch of tip:
Commit-ID: 9f61ccc85afb061f65dd8ede7b8d4845b2f2dfce
Gitweb: https://git.kernel.org/tip/9f61ccc85afb061f65dd8ede7b8d4845b2f2dfce
Author: Dave Hansen <[email protected]>
AuthorDate: Thu, 31 Mar 2022 10:57:28 -07:00
Committer: Borislav Petkov <[email protected]>
CommitterDate: Tue, 05 Apr 2022 21:54:04 +02:00
x86/configs: Add x86 debugging Kconfig fragment plus docs
The kernel has a wide variety of debugging options to help catch
and squash bugs. However, new debugging is added all the time and
the existing options can be hard to find.
Add a Kconfig fragment with the debugging options which tip
maintainers expect to be used to test contributions.
This should make it easier for contributors to test their code and
find issues before submission.
[ bp: Add to "make help" output ]
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/process/maintainer-tip.rst | 14 ++++++++++++++
arch/x86/Makefile | 1 +
kernel/configs/x86_debug.config | 18 ++++++++++++++++++
3 files changed, 33 insertions(+)
create mode 100644 kernel/configs/x86_debug.config
diff --git a/Documentation/process/maintainer-tip.rst b/Documentation/process/maintainer-tip.rst
index c74f4a8..572a328 100644
--- a/Documentation/process/maintainer-tip.rst
+++ b/Documentation/process/maintainer-tip.rst
@@ -437,6 +437,20 @@ in a private repository which allows interested people to easily pull the
series for testing. The usual way to offer this is a git URL in the cover
letter of the patch series.
+Testing
+^^^^^^^
+
+Code should be tested before submitting to the tip maintainers. Anything
+other than minor changes should be built, booted and tested with
+comprehensive (and heavyweight) kernel debugging options enabled.
+
+These debugging options can be found in kernel/configs/x86_debug.config
+and can be added to an existing kernel config by running:
+
+ make x86_debug.config
+
+Some of these options are x86-specific and can be left out when testing
+on other architectures.
Coding style notes
------------------
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 63d50f6..1abd7cc 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -313,5 +313,6 @@ define archhelp
echo ''
echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
+ echo ' x86_debug.config - Enable tip tree debugging options for testing'
endef
diff --git a/kernel/configs/x86_debug.config b/kernel/configs/x86_debug.config
new file mode 100644
index 0000000..45498c0
--- /dev/null
+++ b/kernel/configs/x86_debug.config
@@ -0,0 +1,18 @@
+CONFIG_X86_DEBUG_FPU=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_VM_VMACACHE=y
+CONFIG_DEBUG_VM_RB=y
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_KMEMCHECK=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
+CONFIG_GCOV_KERNEL=y
+CONFIG_LOCKDEP=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_SCHEDSTATS=y
+CONFIG_VMLINUX_VALIDATION=y
+CONFIG_DEBUG_INFO=y
On Tue, Apr 05, 2022 at 08:01:55PM -0000, tip-bot2 for Dave Hansen wrote:
> The following commit has been merged into the x86/build branch of tip:
>
> Commit-ID: 9f61ccc85afb061f65dd8ede7b8d4845b2f2dfce
> Gitweb: https://git.kernel.org/tip/9f61ccc85afb061f65dd8ede7b8d4845b2f2dfce
> Author: Dave Hansen <[email protected]>
> AuthorDate: Thu, 31 Mar 2022 10:57:28 -07:00
> Committer: Borislav Petkov <[email protected]>
> CommitterDate: Tue, 05 Apr 2022 21:54:04 +02:00
>
> x86/configs: Add x86 debugging Kconfig fragment plus docs
>
> The kernel has a wide variety of debugging options to help catch
> and squash bugs. However, new debugging is added all the time and
> the existing options can be hard to find.
>
> Add a Kconfig fragment with the debugging options which tip
> maintainers expect to be used to test contributions.
>
> This should make it easier for contributors to test their code and
> find issues before submission.
>
> [ bp: Add to "make help" output ]
>
> Signed-off-by: Dave Hansen <[email protected]>
> Signed-off-by: Borislav Petkov <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> ---
> Documentation/process/maintainer-tip.rst | 14 ++++++++++++++
> arch/x86/Makefile | 1 +
> kernel/configs/x86_debug.config | 18 ++++++++++++++++++
> 3 files changed, 33 insertions(+)
> create mode 100644 kernel/configs/x86_debug.config
>
> diff --git a/Documentation/process/maintainer-tip.rst b/Documentation/process/maintainer-tip.rst
> index c74f4a8..572a328 100644
> --- a/Documentation/process/maintainer-tip.rst
> +++ b/Documentation/process/maintainer-tip.rst
> @@ -437,6 +437,20 @@ in a private repository which allows interested people to easily pull the
> series for testing. The usual way to offer this is a git URL in the cover
> letter of the patch series.
>
> +Testing
> +^^^^^^^
> +
> +Code should be tested before submitting to the tip maintainers. Anything
> +other than minor changes should be built, booted and tested with
> +comprehensive (and heavyweight) kernel debugging options enabled.
> +
> +These debugging options can be found in kernel/configs/x86_debug.config
> +and can be added to an existing kernel config by running:
> +
> + make x86_debug.config
> +
> +Some of these options are x86-specific and can be left out when testing
> +on other architectures.
>
> Coding style notes
> ------------------
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 63d50f6..1abd7cc 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -313,5 +313,6 @@ define archhelp
> echo ''
> echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
> echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
> + echo ' x86_debug.config - Enable tip tree debugging options for testing'
>
> endef
> diff --git a/kernel/configs/x86_debug.config b/kernel/configs/x86_debug.config
> new file mode 100644
> index 0000000..45498c0
> --- /dev/null
> +++ b/kernel/configs/x86_debug.config
> @@ -0,0 +1,18 @@
> +CONFIG_X86_DEBUG_FPU=y
> +CONFIG_LOCK_STAT=y
> +CONFIG_DEBUG_VM=y
> +CONFIG_DEBUG_VM_VMACACHE=y
> +CONFIG_DEBUG_VM_RB=y
> +CONFIG_DEBUG_SLAB=y
> +CONFIG_DEBUG_KMEMLEAK=y
> +CONFIG_DEBUG_PAGEALLOC=y
> +CONFIG_SLUB_DEBUG_ON=y
> +CONFIG_KMEMCHECK=y
> +CONFIG_DEBUG_OBJECTS=y
> +CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
> +CONFIG_GCOV_KERNEL=y
> +CONFIG_LOCKDEP=y
> +CONFIG_PROVE_LOCKING=y
> +CONFIG_SCHEDSTATS=y
> +CONFIG_VMLINUX_VALIDATION=y
> +CONFIG_DEBUG_INFO=y
I am replying to this message versus the original patch because this
appears to be done during committing.
This "CONFIG_DEBUG_INFO=y" will not do anything, as the debug info
Kconfig was turned into a choice in commit f9b3cd245784 ("Kconfig.debug:
make DEBUG_INFO selectable from a choice").
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
will do what "CONFIG_DEBUG_INFO=y" used to do.
Cheers,
Nathan
On Wed, Apr 06, 2022 at 09:55:38AM -0700, Nathan Chancellor wrote:
> I am replying to this message versus the original patch because this
> appears to be done during committing.
>
> This "CONFIG_DEBUG_INFO=y" will not do anything, as the debug info
> Kconfig was turned into a choice in commit f9b3cd245784 ("Kconfig.debug:
> make DEBUG_INFO selectable from a choice").
>
> CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
>
> will do what "CONFIG_DEBUG_INFO=y" used to do.
Thanks Nathan, fixed.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
The following commit has been merged into the x86/build branch of tip:
Commit-ID: 9b5a7f4a2a8dcda461f9c7a6671150f4a8a902e8
Gitweb: https://git.kernel.org/tip/9b5a7f4a2a8dcda461f9c7a6671150f4a8a902e8
Author: Dave Hansen <[email protected]>
AuthorDate: Thu, 31 Mar 2022 10:57:28 -07:00
Committer: Borislav Petkov <[email protected]>
CommitterDate: Wed, 06 Apr 2022 19:56:29 +02:00
x86/configs: Add x86 debugging Kconfig fragment plus docs
The kernel has a wide variety of debugging options to help catch
and squash bugs. However, new debugging is added all the time and
the existing options can be hard to find.
Add a Kconfig fragment with the debugging options which tip
maintainers expect to be used to test contributions.
This should make it easier for contributors to test their code and
find issues before submission.
[ bp: Add to "make help" output, fix DEBUG_INFO selection as pointed
out by Nathan Chancellor <[email protected]>. ]
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/process/maintainer-tip.rst | 14 ++++++++++++++
arch/x86/Makefile | 1 +
kernel/configs/x86_debug.config | 18 ++++++++++++++++++
3 files changed, 33 insertions(+)
create mode 100644 kernel/configs/x86_debug.config
diff --git a/Documentation/process/maintainer-tip.rst b/Documentation/process/maintainer-tip.rst
index c74f4a8..572a328 100644
--- a/Documentation/process/maintainer-tip.rst
+++ b/Documentation/process/maintainer-tip.rst
@@ -437,6 +437,20 @@ in a private repository which allows interested people to easily pull the
series for testing. The usual way to offer this is a git URL in the cover
letter of the patch series.
+Testing
+^^^^^^^
+
+Code should be tested before submitting to the tip maintainers. Anything
+other than minor changes should be built, booted and tested with
+comprehensive (and heavyweight) kernel debugging options enabled.
+
+These debugging options can be found in kernel/configs/x86_debug.config
+and can be added to an existing kernel config by running:
+
+ make x86_debug.config
+
+Some of these options are x86-specific and can be left out when testing
+on other architectures.
Coding style notes
------------------
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 63d50f6..1abd7cc 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -313,5 +313,6 @@ define archhelp
echo ''
echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest'
echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest'
+ echo ' x86_debug.config - Enable tip tree debugging options for testing'
endef
diff --git a/kernel/configs/x86_debug.config b/kernel/configs/x86_debug.config
new file mode 100644
index 0000000..dcd86f3
--- /dev/null
+++ b/kernel/configs/x86_debug.config
@@ -0,0 +1,18 @@
+CONFIG_X86_DEBUG_FPU=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_VM=y
+CONFIG_DEBUG_VM_VMACACHE=y
+CONFIG_DEBUG_VM_RB=y
+CONFIG_DEBUG_SLAB=y
+CONFIG_DEBUG_KMEMLEAK=y
+CONFIG_DEBUG_PAGEALLOC=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_KMEMCHECK=y
+CONFIG_DEBUG_OBJECTS=y
+CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
+CONFIG_GCOV_KERNEL=y
+CONFIG_LOCKDEP=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_SCHEDSTATS=y
+CONFIG_VMLINUX_VALIDATION=y
+CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y