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] [day] [month] [year] [list]
Message-Id: <1190649210.4035.224.camel@chaos>
Date:	Mon, 24 Sep 2007 17:53:30 +0200
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Michael Kerrisk <mtk-manpages@....net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch 1/3] new timerfd API - new timerfd API

On Mon, 2007-09-24 at 08:42 -0700, Davide Libenzi wrote:
> > > +			ticks += (u64)
> > >  				hrtimer_forward(&ctx->tmr,
> > >  						hrtimer_cb_get_time(&ctx->tmr),
> > 
> > You need to use ctx->tmr.base->get_time() here, otherwise you might read
> > a stale time value (in case that CONFIG_HIGH_RES_TIMERS is off).
> 
> Is the particular position of hrtimer_cb_get_time() in the code that would 
> break here? Because function was added by your patch ;)
> Did something change later?

For non high res systems we speed up the access to now by storing the
current time when we start to process the hrtimer softirq callbacks.

hrtimer_cb_get_time(timer) reads timer->base->now

For high resolution systems hrtimer_cb_get_time() resolves to
timer->base->get_time().

In the timerfd case we are not in softirq context and we read at any
given later time. Also on SMP the base->now variable might be changed by
the softirq running on the other CPU.

	tglx


-
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