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: <AE90C24D6B3A694183C094C60CF0A2F6D8AD04@saturn3.aculab.com>
Date:	Wed, 27 Apr 2011 13:42:30 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Eric B Munson" <emunson@...bm.net>
Cc:	<benh@...nel.crashing.org>, <a.p.zijlstra@...llo.nl>,
	<paulus@...ba.org>, <mingo@...e.hu>, <acme@...stprotocols.net>,
	<linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
	<anton@...ba.org>, <stable@...nel.org>
Subject: RE: [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks

 
> +	if (prev > val && (prev - val) < 256)
> +		delta = 0;
> +
> +	return delta;

Also, 'prev' is a true 64bit value, but 'val' is only ever 32bits.
So once the 64bit 'prev' exceeds 2^32+256 both 'prev > val'
and 'prev - val' are true regardless of the value of 'val'.
This will lead to jumps in the value ....

	David


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ