From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B0A833D6EE for ; Tue, 24 Mar 2026 07:42:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774338157; cv=none; b=ED8OvJMi8qGqSbyjeWVpmpXEV5D4xlyt0yAY+/SK2pdDv1AdlrQwt2hrfKtSJQ6Kcui9Ev52u8Pos7UaWrxtRCYttenfXj+huVJeUqMMdIlbBHEVK9ti00lIKHgVHIpbcYuLj6fahvSLWZYNZeF+XO7Jf5Q5G5xvhItbyECcZkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774338157; c=relaxed/simple; bh=A+mAC1Eha29cwHPaApvpOPIbrzU4/1ZiyHJFDmYaNXE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N+EjMirHfKsjyvCcm1Jmp2vonjVTmA/gNiae3mYipTYkz5WsIheo2sjnlLZ/DfMdmziGODfiNgqvjIpGKU3UTvqjzf7bZ0ZmGr1fgGUtyFHz2ujpUAxJ0CtBFNvlHaJw9ahUU4efEIISkBchxkL61e9mkXmr93UulPuoyKsmgrY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V6U/ujQ6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V6U/ujQ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FC4AC19424; Tue, 24 Mar 2026 07:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774338156; bh=A+mAC1Eha29cwHPaApvpOPIbrzU4/1ZiyHJFDmYaNXE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=V6U/ujQ6IAuBIj91JuhMr1gns1md6zNY/Fk638HFjt8rqqFcQrV8nXxPmXidgozy8 abmTL/2qEVWuM+0xN8u18FrvVbvbXB5SlL25YEgcPCQ1KmuopdLmRcwvVzHQAFGPv2 mUmJvjVgUFpgmTczowvAH2RsjUDd6mHNxIsSWI24QnSBKzbgat5PS8YcuuyXNrmwqj FszJeNumCOi7XmwRNxYWAn1A7Lphf6NzKk38CLfH9LbwZWTnxc73IC2/a7Cg9G4Kup M2rn6FwChZ3sgbJn6m95cPRJOj67goHZkaJcxkemgPJqWyBmdXTVTpLEvaKcAebDnI +pli83gWJgAnQ== Message-ID: <546bd03e-eddf-424f-85f2-1d1c45880f56@kernel.org> Date: Tue, 24 Mar 2026 08:42:32 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: kmemleak: add CONFIG_DEBUG_KMEMLEAK_VERBOSE build option Content-Language: en-US To: Breno Leitao , Andrew Morton , Catalin Marinas , David Hildenbrand Cc: Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com References: <20260323-kmemleak_report-v1-1-ba2cdd9c11b9@debian.org> From: "Vlastimil Babka (SUSE)" In-Reply-To: <20260323-kmemleak_report-v1-1-ba2cdd9c11b9@debian.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/23/26 12:12, 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: Vlastimil Babka (SUSE)