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: <1179240951.7903.0.camel@athena.fprintf.net>
Date:	Tue, 15 May 2007 10:55:51 -0400
From:	Daniel Gryniewicz <dang@...too.org>
To:	Eric Dumazet <dada1@...mosbay.com>
Cc:	Andi Kleen <ak@...e.de>, Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	john stultz <johnstul@...ibm.com>,
	linux-kernel@...r.kernel.org,
	"bugme-daemon@...nel-bugs.osdl.org" 
	<bugme-daemon@...zilla.kernel.org>, stable@...nel.org
Subject: Re: [Bugme-new] [Bug 8479] New: gettimeofday returning 1000000 in
	tv_usec on core2duo

On Tue, 2007-05-15 at 10:17 +0200, Eric Dumazet wrote:
> OK, here is the fix only patch, for linux-2.6.21-stable only, since 2.6.22 is already fixed.
> 
> [PATCH] x86_64 : Fix vgettimeofday()
> 
> vgettimeofday() may return some bad timeval values, (tv_usec = 1000000), because of a wrong compare.
> 
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
> 
> --- arch/x86_64/kernel/vsyscall.c
> +++ arch/x86_64/kernel/vsyscall.c
> @@ -132,7 +132,7 @@ static __always_inline void do_vgettimeo
>  
>  	/* convert to usecs and add to timespec: */
>  	tv->tv_usec += nsec_delta / NSEC_PER_USEC;
> -	while (tv->tv_usec > USEC_PER_SEC) {
> +	while (tv->tv_usec >= USEC_PER_SEC) {
>  		tv->tv_sec += 1;
>  		tv->tv_usec -= USEC_PER_SEC;
>  	}

That fixed it, thanks.

Daniel

-
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