lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLdfOrQ4O4rnD5M9@arm.com>
Date: Tue, 2 Sep 2025 22:18:50 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Matthieu Baerts <matttbe@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>, mptcp@...ts.linux.dev,
	Mat Martineau <martineau@...nel.org>,
	Geliang Tang <geliang@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
	Shuah Khan <shuah@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kselftest@...r.kernel.org, Eric Biggers <ebiggers@...nel.org>,
	Christoph Paasch <cpaasch@...nai.com>,
	Gang Yan <yangang@...inos.cn>
Subject: Re: [PATCH net-next 0/6] mptcp: misc. features for v6.18

On Tue, Sep 02, 2025 at 08:50:19PM +0200, Matthieu Baerts wrote:
> Hi Catalin,
> 
> 2 Sept 2025 20:25:19 Catalin Marinas <catalin.marinas@....com>:
> 
> > On Tue, Sep 02, 2025 at 08:27:59AM -0700, Jakub Kicinski wrote:
> >> On Tue, 2 Sep 2025 16:51:47 +0200 Matthieu Baerts wrote:
> >>> It is unclear why a second scan is needed and only the second one caught
> >>> something. Was it the same with the strange issues you mentioned in
> >>> driver tests? Do you think I should re-add the second scan + cat?
> >>
> >> Not sure, cc: Catalin, from experience it seems like second scan often
> >> surfaces issues the first scan missed.
> >
> > It's some of the kmemleak heuristics to reduce false positives. It does
> > a checksum of the object during scanning and only reports a leak if the
> > checksum is the same in two consecutive scans.
> 
> Thank you for the explanation!
> 
> Does that mean a scan should be triggered at the end of the tests,
> then wait 5 second for the grace period, then trigger another scan
> and check the results?
> 
> Or wait 5 seconds, then trigger two consecutive scans?

The 5 seconds is the minimum age of an object before it gets reported as
a leak. It's not related to the scanning process. So you could do two
scans in succession and wait 5 seconds before checking for leaks.

However, I'd go with the first option - do a scan, wait 5 seconds and do
another. That's mostly because at the end of the scan kmemleak prints if
it found new unreferenced objects. It might not print the message if a
leaked object is younger than 5 seconds. In practice, though, the scan
may take longer, depending on how loaded your system is.

The second option works as well but waiting between them has a better
chance of removing false positives if, say, some objects are moved
between lists and two consecutive scans do not detect the list_head
change (and update the object's checksum).

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ