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 85EF1414DD3 for ; Mon, 3 Aug 2026 13:44:30 +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=1785764672; cv=none; b=mEjH16X8eOjjm7Hm27zpNQB9DZgDScKGyDgaCcb/7dBOIyM76J0eUca3ebPC2/oaVr3Q3n2Kr5eTqRTeNvkjYBJSmgz7nifewcLrBstVPePWJApHkA3zMyRO0PnMRL/xqqOziNeP+RUextMAQe7dV19PccY8FRQJQtlrK2IiVqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785764672; c=relaxed/simple; bh=FbJxtBRUzaq14tEYegaKum4NxMdFUr/7vbSSHB92jDo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qBf0xv3xSx9/Sp4LW2HF92Ap7G6xtni5km58lB+8ysbHX/s32jksYQqOlsyfxx2RaGSEmqZNXyK7iy75Vp2PGUcmLhnNLgj0HwCdVqahUerGG4Vn8gg+nZT1bf7UJa5JhlOPDySLAVnmd0Ym5fyDok4vsxGuX01IEwCO7fBtQQI= 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=Hy3P94XF; 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="Hy3P94XF" 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 E20CE1596; Mon, 3 Aug 2026 06:44:25 -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 145D63FAF5; Mon, 3 Aug 2026 06:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785764669; bh=FbJxtBRUzaq14tEYegaKum4NxMdFUr/7vbSSHB92jDo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hy3P94XFDUXk6tU9GNq5CIL9vpL5JIYIqJxo5Dddl4Lyni2Z2dqfmtSz7120G69az jYGFL76aKiodXvYN3OVrzPyfesEB+Um0xxKOQeANvgv19bpPIw6aRwaOOF9SzjT9kJ ijB/52AFaeXBreAiDELLWQHFMElZ1lGk/T3KkQD4= Date: Mon, 3 Aug 2026 14:44:22 +0100 From: Catalin Marinas To: Breno Leitao Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm: kmemleak: default min_unref_scans to 2 for verbose auto-scan Message-ID: References: <20260730-kmemleak_hardened-v1-1-b0b20033b4bb@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: On Mon, Aug 03, 2026 at 02:41:20PM +0100, Catalin Marinas wrote: > On Thu, Jul 30, 2026 at 07:31:21AM -0700, Breno Leitao wrote: > > min_unref_scans defers reporting an object as leaked until it has stayed > > unreferenced for that many consecutive scans, filtering out objects that > > are only transiently unreferenced during a scan. > > > > It defaults to 1, which reports on the first unreferenced scan. > > > > When CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN and CONFIG_DEBUG_KMEMLEAK_VERBOSE are > > both enabled, the scan thread runs periodically and the user has opted into > > detailed leak reporting, so a second confirming scan happens on its own. > > > > Default min_unref_scans to 2 in that configuration to suppress transient > > false positives. > > > > Keep the default at 1 otherwise, where a manually triggered scan is > > expected to report immediately. The value stays writable through the module > > parameter. > > > > Signed-off-by: Breno Leitao > > Acked-by: Catalin Marinas Ah, I noticed there's a v2. Ignore this one. -- Catalin