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]
Date:	Thu, 23 Jun 2016 18:31:42 +0200
From:	Cyril Hrubis <chrubis@...e.cz>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	George Spelvin <linux@...encehorizons.net>, arjan@...radead.org,
	clm@...com, edumazet@...gle.com, fweisbec@...il.com,
	lenb@...nel.org, linux-kernel@...r.kernel.org, ltp@...ts.linux.it,
	mingo@...nel.org, paulmck@...ux.vnet.ibm.com, peterz@...radead.org,
	riel@...hat.com, rt@...utronix.de, torvalds@...ux-foundation.org,
	umgwanakikbuti@...il.com
Subject: Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel

Hi!
> > That is likely POSIX conformance bug, since POSIX explicitly states that
> > sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout.
> > 
> > "If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock
> > shall be used to measure the time interval specified by the timeout
> > argument."
> 
> That's fine because jiffies is a less granular form of CLOCK_MONOTONIC.

Looking into POSIX Realtime Clock and Timers it seems to allow that time
service based on CLOCK_* clocks to have different resolution if it's
less or equal than 20ms and if this fact is documented. If we wanted to
be pedantic about this the man page shoud be patched...

Also this gives us reasonably safe upper bound on timer expiration to be
something as:

sleep_time * 1.125 + 20ms

Does this sounds reasonable now?

-- 
Cyril Hrubis
chrubis@...e.cz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ