mm-kmemleak-add-config_debug_kmemleak_verbose-build-option.patch removed from -mm tree
The quilt patch titled
Subject: mm: kmemleak: add CONFIG_DEBUG_KMEMLEAK_VERBOSE build option
has been removed from the -mm tree. Its filename was
mm-kmemleak-add-config_debug_kmemleak_verbose-build-option.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Breno Leitao <[email protected]>
Subject: mm: kmemleak: add CONFIG_DEBUG_KMEMLEAK_VERBOSE build option
Date: Mon, 23 Mar 2026 04:12:13 -0700
Add a Kconfig option to default kmemleak verbose mode on at build time. This option depends on DEBUG_KMEMLEAK_AUTO_SCAN since verbose reporting is only meaningful when the automatic scanning thread is running.
When enabled, kmemleak prints full details (backtrace, hex dump, address) of unreferenced objects to dmesg as they are detected during scanning, removing the need to manually read /sys/kernel/debug/kmemleak.
Making this a compile-time option rather than a boot parameter allows debug kernel flavors to enable verbose kmemleak reporting by default without requiring changes to boot arguments. A machine can simply swap to a debug kernel and benefit from kmemleak reporting automatically.
By surfacing leak reports directly in dmesg, they are automatically forwarded through any kernel logging infrastructure and can be easily captured by log aggregation tooling, making it practical to monitor memory leaks across large fleets.
The verbose setting can still be toggled at runtime via /sys/module/kmemleak/parameters/verbose.
---
mm/Kconfig.debug | 11 +++++++++++ mm/kmemleak.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
mm/Kconfig.debug renamed from mm/Kconfig.debug~mm-kmemleak-add-config_debug_kmemleak_verbose-build-option +11 -0
@@ -297,6 +297,17 @@ config DEBUG_KMEMLEAK_AUTO_SCAN If unsure, say Y. +config DEBUG_KMEMLEAK_VERBOSE + bool "Default kmemleak to verbose mode" + depends on DEBUG_KMEMLEAK_AUTO_SCAN + help + Say Y here to have kmemleak print unreferenced object details + (backtrace, hex dump, address) to dmesg when new memory leaks are + detected during automatic scanning. This can also be toggled at + runtime via /sys/module/kmemleak/parameters/verbose. + + If unsure, say N. + config PER_VMA_LOCK_STATS bool "Statistics for per-vma locks" depends on PER_VMA_LOCK
mm/kmemleak.c renamed from mm/kmemleak.c~mm-kmemleak-add-config_debug_kmemleak_verbose-build-option +1 -1
@@ -241,7 +241,7 @@ static int kmemleak_skip_disable;/* If there are leaks that can be reported */ static bool kmemleak_found_leaks; -static bool kmemleak_verbose; +static bool kmemleak_verbose =IS_ENABLED (CONFIG_DEBUG_KMEMLEAK_VERBOSE );module_param_named (verbose, kmemleak_verbose, bool,0600 );static void kmemleak_disable (void );
_
Patches currently in -mm which might be from [email protected] are
mm-blk-cgroup-fix-use-after-free-in-cgwb_release_workfn.patch kho-fix-error-handling-in-kho_add_subtree.patch mm-vmstat-spread-vmstat_update-requeue-across-the-stat-interval.patch