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: <Pine.LNX.4.64.0812031701210.24668@localhost.localdomain>
Date:	Wed, 3 Dec 2008 17:09:07 +0100 (CET)
From:	Roman Zippel <zippel@...ux-m68k.org>
To:	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
cc:	john stultz <johnstul@...ibm.com>,
	lkml <linux-kernel@...r.kernel.org>, alex.shi@...el.com,
	Thomas Gleixner <tglx@...x.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH] Catch xtime_nsec underflows and fix them

Hi,

On Wed, 3 Dec 2008, Zhang, Yanmin wrote:

> > > When xtime_nsec underflows at the first time, xtime.tv_nsec becomes -1.
> > > Later on when the second tick arrives, below statement in the while loop
> > >  clock->xtime_nsec += clock->xtime_interval;
> > > will cause clock->xtime_nsec becomes positive again. So the second tick
> > > appears a going-backward time.
> > 
> > Yes, but only by 1nsec, so normally it wouldn't be noticable.
> Not 1nsec. At the second tick, go back about 4294967296 nsec (2^32), about
> 4 seconds. That matches the output of testing process.

Above code is not the problem. The error appeared in do_vgettimeofday() as 
it only uses unsigned values, so the -1 became 0xffffffff in nsec and the 
clock jumped forward 4 seconds and a tick later 4 seconds back.

bye, Roman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ