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 912DE40756E for ; Mon, 3 Aug 2026 13:41:25 +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=1785764487; cv=none; b=L3QgCZ0j/185CgzzWRmBYqyVvjWPF2GYQR3vLP4Wh5NwLmolsSZyHuahrtYfHNmp5aHULKmC9PFXckx8W4lVd113FAf9V4ZzUS5+GzwrKVMobCZoYVrTnyww3k2NxeSU5rHWtcB1l0vJxq/FJm8ybQHoVyWECadHiZo/gmeoI30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785764487; c=relaxed/simple; bh=Iuo7pUTza4UWUwQ1dXSfrokh0IIgddyLc/uxMKgri2k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O+A+nbJpeYllcXt35ohqtZ/WJ/5JzmRCJKvYInL9TUHBNsOQnnyZnrYPiPB4OgviUQghxERtEteGYPHR8+/j1bC7r5raLYMqEfRe0wYPQV9/XgdnEdCnj4o6iPYaOzKwpzJs1sKpaFfJX8n0wrU+oqNxHInNMCdpTwFa933WRoU= 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=RgnqxIc5; 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="RgnqxIc5" 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 BA3371476; Mon, 3 Aug 2026 06:41:20 -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 EC9E93F66F; Mon, 3 Aug 2026 06:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1785764484; bh=Iuo7pUTza4UWUwQ1dXSfrokh0IIgddyLc/uxMKgri2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RgnqxIc5A4hDNvmmDuRfbNnVTc1TmQsuhtYOj0JrWT0jRmjBA2CTQTTgKP6AtG9IE nOxRxSNT6pRHgpIueuJUzx/ZQBqUTxeJoI/kb2gHgp3LUHvdF4ctZJdVldyCIBZRk7 ZCqz25FYqnn6ZYxygxEuZZtRXt2nEt+8UReW3QVk= Date: Mon, 3 Aug 2026 14:41:20 +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: <20260730-kmemleak_hardened-v1-1-b0b20033b4bb@debian.org> 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