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: <CAGXu5j+--cmhOHMR+7ewWt_ct-0p_o8sbK4bJWkgj067aeFjsw@mail.gmail.com>
Date:	Sun, 18 Nov 2012 12:09:16 -0800
From:	Kees Cook <keescook@...omium.org>
To:	John Stultz <johnstul@...ibm.com>
Cc:	Anton Vorontsov <anton.vorontsov@...aro.org>,
	linux-kernel@...r.kernel.org, Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v2] pstore/ram: no timekeeping calls when unavailable

On Fri, Nov 16, 2012 at 7:16 PM, John Stultz <johnstul@...ibm.com> wrote:
> Yea, I wanted to revisit this, because it is an odd case.
>
> We don't want to call getnstimeofday() while the timekeeping code is
> suspended, since the clocksource cycle_last value may be invalid if the
> hardware was reset during suspend.  Kees is correct,  the WARN_ONs were
> there to make sure no one tries to use the timekeeping core before its
> resumed, so removing them is problematic.
>
> Your sugggestion of having the __do_gettimeofday() internal accessor that
> maybe returns an error if timekeeping has been suspended could work.
>
> The other possibility is depending on the needs for accuracy with the
> timestamp, current_kernel_time() might be a better interface to use, since
> it will return the time at the last tick, and doesn't require accessing the
> clocksource hardware.  Might that be a simpler solution? Or is sub-tick
> granularity necessary?

I think it's only useful to have this to the same granularity as
sched_clock(), so things can be correlated to dmesg output. If it's
the same, I'd be fine to switch to using current_kernel_time().

-Kees

-- 
Kees Cook
Chrome OS Security
--
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