From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 569843D5248 for ; Wed, 25 Mar 2026 17:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774459458; cv=none; b=UtrWbgGIVYlM6DauoF8XgIqzHBC1zcbdUi7E8iYtJ4jX/CvzrQLTkCNOvuot5YR80xc/Dv1UD3uJne5MZhyA+FZcycCxsWqNq+bvxwBgoME7HoVAc8ThscyGm471tWAmCM4ya16GJY8r2i7iVcUwBbrJb+14IzUBGArmWzHDT0Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774459458; c=relaxed/simple; bh=TiuXT9NXs8/Mo9xPQcHRFeA3hC481saXm8LjpAnoYZE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=meSq3Nr+hJK1LLIN8qSCdyfPCOf0xpsJSld4YZ8RNSCgRiasFv+ym5VAtem4yNsv4isbPkjGsQh6jkYABhAF7IrqliDbsJiDWDsf2rJ+qq9ULSiCV6x8ewIs7GKz2ljjQvg9mlzJ384nF4wyZMyM3/R4AXZsSDPRlodDf39qKdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=niHokkjg; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="niHokkjg" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9645D2444; Wed, 25 Mar 2026 10:24:10 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0D5EF3F836; Wed, 25 Mar 2026 10:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1774459456; bh=TiuXT9NXs8/Mo9xPQcHRFeA3hC481saXm8LjpAnoYZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=niHokkjgNoo8Snrt0nc60qG9+ESssyWERXlIiBvh/Gk985Yc8tLc8PYqUdsmOG2ak 5WICkB4GH9xceepX+nqSM3xLE0sW1fxX6xE+ctN1GEdHnn37tDwSaAhA6ZzMU8YHav cY36nmtwfb+WZWtcyxOrXvgX7JR/K9ivlJlA4OHo= Date: Wed, 25 Mar 2026 17:24:12 +0000 From: Catalin Marinas To: Breno Leitao Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm: kmemleak: add CONFIG_DEBUG_KMEMLEAK_VERBOSE build option Message-ID: References: <20260323-kmemleak_report-v1-1-ba2cdd9c11b9@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260323-kmemleak_report-v1-1-ba2cdd9c11b9@debian.org> On Mon, Mar 23, 2026 at 04:12:13AM -0700, Breno Leitao wrote: > 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. > > Signed-off-by: Breno Leitao Acked-by: Catalin Marinas