From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: "Ingo Molnar" <mingo@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Borislav Petkov" <bp@alien8.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Jürgen Groß" <jgross@suse.com>,
"Ard Biesheuvel" <ardb@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"David Woodhouse" <dwmw@amazon.co.uk>,
"Ivan Shapovalov" <intelfx@intelfx.name>,
"Masahiro Yamada" <yamada.masahiro@socionext.com>,
"Michal Marek" <michal.lkml@markovi.net>
Subject: [PATCH 10/13] x86/kconfig/64: Enable popular kernel debugging options in the defconfig
Date: Thu, 15 May 2025 15:27:16 +0200 [thread overview]
Message-ID: <20250515132719.31868-11-mingo@kernel.org> (raw)
In-Reply-To: <20250515132719.31868-1-mingo@kernel.org>
Since the x86 defconfig aims to be a distro kernel work-alike with
fewer drivers and a shorter build time, enable a handful of
kernel debugging options that are typically enabled on major Linux
distributions.
The options enabled is a superset of the latest Ubuntu and Fedora
kernel debugging configs, using Ubuntu's config-6.11.0-24-generic
file, Fedora's kernel-x86_64-fedora.config and RHEL's
kernel-x86_64-rhel.config from kernel-ark.git.
Notable features enabled:
- CONFIG_UBSAN=y:
Despite the runtime overhead, UBSAN is actively enabled
in all 3 major Linux distros I checked, so we want it
enabled in the defconfig as well - to better see the
consequences.
- CONFIG_DEBUG_SHIRQ=y:
Fedora/RHEL have this enabled, while Ubuntu has it disabled.
- CONFIG_LIST_HARDENED=y:
Fedora/RHEL have CONFIG_DEBUG_LIST enabled, while Ubuntu has
it disabled, so pick the lightweight LIST_HARDENED variant.
- CONFIG_FUNCTION_PROFILER=y:
This is enabled on all distros I checked as well.
DEBUGINFO is still disabled, despite enabled in all Linux distros,
because the ~10x .o bloat is still just so painful on anything
but the most powerful build boxes.
Note that while the following features seemingly get removed from
the defconfig :
- CONFIG_BLK_DEV_INITRD=y
- CONFIG_KPROBES=y
- CONFIG_MAGIC_SYSRQ=y
they are actually still enabled in the actual .config, because they
get selected by other options indirectly.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ivan Shapovalov <intelfx@intelfx.name>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
arch/x86/configs/x86_64_defconfig | 46 ++++++++++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 02c4ba79946b..3c4a03633328 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -31,7 +31,6 @@ CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_CGROUP_MISC=y
CONFIG_CGROUP_DEBUG=y
-CONFIG_BLK_DEV_INITRD=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_KEXEC=y
@@ -68,7 +67,6 @@ CONFIG_KVM_INTEL=y
CONFIG_KVM_AMD=y
CONFIG_KVM_XEN=y
CONFIG_KVM_MAX_NR_VCPUS=4096
-CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
@@ -303,14 +301,56 @@ CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_LIST_HARDENED=y
CONFIG_PRINTK_TIME=y
+CONFIG_BOOT_PRINTK_DELAY=y
+CONFIG_DYNAMIC_DEBUG=y
CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_HEADERS_INSTALL=y
+CONFIG_DEBUG_SECTION_MISMATCH=y
+CONFIG_KGDB=y
+CONFIG_KGDB_TESTS=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
+CONFIG_KDB_KEYBOARD=y
+CONFIG_UBSAN=y
+CONFIG_UBSAN_SHIFT=y
+CONFIG_PAGE_OWNER=y
+CONFIG_PAGE_POISONING=y
CONFIG_DEBUG_WX=y
+CONFIG_PER_VMA_LOCK_STATS=y
CONFIG_DEBUG_STACK_USAGE=y
+CONFIG_SCHED_STACK_END_CHECK=y
+CONFIG_KFENCE=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_PANIC_ON_OOPS=y
+CONFIG_HARDLOCKUP_DETECTOR=y
+CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
+CONFIG_WQ_CPU_INTENSIVE_REPORT=y
CONFIG_SCHEDSTATS=y
+CONFIG_NMI_CHECK_CPU=y
+CONFIG_RCU_CPU_STALL_CPUTIME=y
+CONFIG_BOOTTIME_TRACING=y
+CONFIG_FUNCTION_GRAPH_RETVAL=y
+CONFIG_FPROBE=y
+CONFIG_FUNCTION_PROFILER=y
+CONFIG_STACK_TRACER=y
+CONFIG_SCHED_TRACER=y
+CONFIG_HWLAT_TRACER=y
+CONFIG_TIMERLAT_TRACER=y
+CONFIG_MMIOTRACE=y
+CONFIG_FTRACE_SYSCALLS=y
CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_USER_EVENTS=y
+CONFIG_HIST_TRIGGERS=y
+CONFIG_TRACE_EVENT_INJECT=y
+CONFIG_RV=y
+CONFIG_RV_MON_WWNR=y
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_EARLY_PRINTK_DBGP=y
+CONFIG_EARLY_PRINTK_USB_XDBC=y
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_DEBUG_ENTRY=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
+CONFIG_MEMTEST=y
--
2.45.2
next prev parent reply other threads:[~2025-05-15 13:28 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 13:27 [PATCH -v3 00/13] x86/kconfig: Synchronize the x86 defconfigs with distribution configs Ingo Molnar
2025-05-15 13:27 ` [PATCH 01/13] x86/kconfig/64: Refresh defconfig Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] x86/kconfig/32: " tip-bot2 for Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] x86/kconfig/64: " tip-bot2 for Ingo Molnar
2025-07-14 14:33 ` [tip: x86/kconfig] x86/kconfig/32: " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 02/13] " Ingo Molnar
2025-05-15 13:27 ` [PATCH 03/13] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-06-13 17:12 ` [PATCH 03/13] " Brian Gerst
2025-06-15 11:25 ` Ingo Molnar
2025-05-15 13:27 ` [PATCH 04/13] x86/tools: insn_decoder_test.c: Emit standard build success messages Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-06-15 11:34 ` tip-bot2 for Ingo Molnar
2025-07-14 14:33 ` tip-bot2 for Ingo Molnar
2025-07-14 15:10 ` tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 05/13] x86/tools: insn_sanity.c: " Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-06-15 11:34 ` tip-bot2 for Ingo Molnar
2025-07-14 14:33 ` tip-bot2 for Ingo Molnar
2025-07-14 15:10 ` tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 06/13] x86/kconfig/64: Enable the KVM host in the defconfig Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 07/13] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V Ingo Molnar
2025-05-15 23:40 ` Michael Kelley
2025-05-16 7:49 ` Ingo Molnar
2025-05-16 13:14 ` Michael Kelley
2025-05-16 8:15 ` Vitaly Kuznetsov
2025-06-14 7:32 ` [PATCH] x86/kconfig/defconfig: Enable CONFIG_DRM_FBDEV_EMULATION=y Ingo Molnar
2025-06-14 10:30 ` [PATCH 07/13] x86/kconfig/64: Enable more virtualization guest options in the defconfig: enable Xen, Xen_PVH, Jailhouse, ACRN, Intel TDX and Hyper-V Peter Zijlstra
2025-06-14 16:46 ` Michael Kelley
2025-06-13 8:25 ` [tip: x86/kconfig] x86/kconfig/64: Enable more virtualization guest options in the defconfig: Enable " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 08/13] x86/kconfig/64: Enable BPF support in the defconfig Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 09/13] x86/kconfig/64: Enable popular MM options " Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-06-14 10:39 ` [PATCH 09/13] " Peter Zijlstra
2025-06-16 18:34 ` Jann Horn
2025-06-14 17:18 ` Linus Torvalds
2025-06-15 11:23 ` Ingo Molnar
2025-06-15 11:29 ` Ingo Molnar
2025-05-15 13:27 ` Ingo Molnar [this message]
2025-06-13 8:25 ` [tip: x86/kconfig] x86/kconfig/64: Enable popular kernel debugging " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 11/13] x86/kconfig/64: Enable popular scheduler, cgroups and namespaces " Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 12/13] x86/kconfig/64: Enable popular generic kernel " Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
2025-05-15 13:27 ` [PATCH 13/13] x86/kconfig/32: Synchronize the x86-32 defconfig to the x86-64 defconfig Ingo Molnar
2025-06-13 8:25 ` [tip: x86/kconfig] " tip-bot2 for Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250515132719.31868-11-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=intelfx@intelfx.name \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vkuznets@redhat.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®