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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100805162934.688280c6@desktopvm.lvknet>
Date:	Thu, 5 Aug 2010 16:29:34 +0400
From:	Alexander Gordeev <lasaine@....cs.msu.su>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	"Nikita V\. Youshchenko" <yoush@...msu.su>,
	linuxpps@...enneenne.com, Rodolfo Giometti <giometti@...eenne.com>,
	john stultz <johnstul@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Jon Hunter <jon-hunter@...com>, Ingo Molnar <mingo@...e.hu>,
	John Kacur <jkacur@...hat.com>
Subject: Re: [PATCHv3 13/16] pps: capture MONOTONIC_RAW timestamps as well

В Wed, 4 Aug 2010 16:29:07 -0700
Andrew Morton <akpm@...ux-foundation.org> пишет:

> On Thu,  5 Aug 2010 01:06:50 +0400
> Alexander Gordeev <lasaine@....cs.msu.su> wrote:
> 
> > --- a/kernel/time/timekeeping.c
> > +++ b/kernel/time/timekeeping.c
> > @@ -286,6 +286,40 @@ void ktime_get_ts(struct timespec *ts)
> >  EXPORT_SYMBOL_GPL(ktime_get_ts);
> >  
> >  /**
> > + * getnstime_raw_and_real - Returns both the time of day an raw
> > + * monotonic time in a timespec format
> > + * @ts_mono_raw:	pointer to the timespec to be set to raw
> > + *			monotonic time
> > + * @ts_real:		pointer to the timespec to be set to the time
> > + *			of day
> > + */
> > +void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real)
> > +{
> > +	unsigned long seq;
> > +	s64 nsecs_raw, nsecs_real;
> > +
> > +	WARN_ON(timekeeping_suspended);
> 
> I suspect that if this warning ever triggers, it'll trigger at some
> high frequency making a complete mess all over the floor.
> 
> WARN_ON_ONCE, perhaps?  Or just remove it?

Well, getnstime_raw_and_real() is actually just a merge of
getnstimeofday() and getrawmonotonic(). The warning came from
getnstimeofday(). Usually this code should be called once a second but
the frequency can be higher. IMHO other functions like getnstimeofday()
and ktime_get_ts() would be a bigger problem anyway because they have
the same checks.

So I'm ok with either choice.
Hmm, will use WARN_ON_ONCE then if nobody objects.

-- 
  Alexander

Download attachment "signature.asc" of type "application/pgp-signature" (490 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ