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: <20071031093100.3a1542b0@laptopd505.fenrus.org>
Date:	Wed, 31 Oct 2007 09:31:00 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Andi Kleen <ak@...e.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Use 64bit timer values while calibrating BogoMips

On Wed, 31 Oct 2007 16:52:16 +0100
Andi Kleen <ak@...e.de> wrote:

> 
> When calibrating BogoMips 32bit architectures using 
> read_current_timer will truncate the timer value to 32bit.
> This is a problem on x86 when the TSC timer is already beyond
> 2^32-1 or wraps during the calibration. The current code
> has no wrap handling.  
> 
> This could potentially lead to wrong BogoMips, causing 
> incorrect delays e.g. in hardware drivers and then difficult
> to track down bugs.

bogomips tends to not be used for that nowadays
> 
> Change read_current_timer() to always return a 64bit
> value even on 32bit and do the computation in 64bit.
> 
> Only found by code inspection; i haven't seen a failure 
> in the wild.
> 
> avr32/sparc64 read_current_timer() updated, but I haven't 
> compiled/tested them.

one general comment, if you really want 64 bit... you're using
"unsigned long long" all over, just use u64 instead.


-- 
If you want to reach me at my work email, use arjan@...ux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
-
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