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: <20171104153415.bc6ttzfpwkkbbhsr@piout.net>
Date:   Sat, 4 Nov 2017 16:34:15 +0100
From:   Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Alan Cox <gnomes@...rguk.ukuu.org.uk>,
        Gabriel Beddingfield <gabe@...tlabs.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        John Stultz <john.stultz@...aro.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        linux-rtc@...r.kernel.org, Guy Erb <guy@...tlabs.com>,
        hharte@...tlabs.com
Subject: Re: Introduce clock precision to help time travelers was Re: Extreme
 time jitter with suspend/resume cycles

On 18/10/2017 at 23:56:38 +0200, Pavel Machek wrote:
> > Some RTCs will tell you when they lost time/time accuracy and this
> > should be properly reported by the driver. If not, this has to be
> > implemented.
> 
> How is it reported to the userspace?
> 

Userspace will get -EINVAL when using the RTC_RD_TIME ioctl. The kernel
also get the same error when reading the time from the RTC.

> > For anything else, it is probably the job of userspace to try to be
> > clever.
> 
> Userspace would be fine with me, but as far as I can tell, there's no
> good way to do it in userspace.
> 
> My proposal would be: kernel keeps accuracy for timeofday.
> 
> If RTC says time is bad, accuracy is set to ~0.
> 
> settimeofday sets accuracy to 0 (completely accurate).
> 
> new_settimeofday gets new argument, accuracy.
> 
> new_gettimofday returns accuracy, too.
> 
> Does that sound sane? I'm not sure what other interfaces need to be extended.
> 
> Best regards,
> 									Pavel
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ