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: <alpine.DEB.2.20.1708151445000.1886@nanos>
Date:   Tue, 15 Aug 2017 14:50:42 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Prarit Bhargava <prarit@...hat.com>
cc:     linux-kernel@...r.kernel.org, Mark Salyzyn <salyzyn@...roid.com>,
        Jonathan Corbet <corbet@....net>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Stultz <john.stultz@...aro.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Christoffer Dall <cdall@...aro.org>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        Ingo Molnar <mingo@...nel.org>,
        Joel Fernandes <joelaf@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Nicholas Piggin <npiggin@...il.com>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Olof Johansson <olof@...om.net>,
        Josh Poimboeuf <jpoimboe@...hat.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH v5] printk: Add monotonic, boottime, and realtime
 timestamps

On Thu, 10 Aug 2017, Prarit Bhargava wrote:
> diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
> index cedafa008de5..1ddf04201047 100644
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -25,6 +25,7 @@
>  #include <linux/stop_machine.h>
>  #include <linux/pvclock_gtod.h>
>  #include <linux/compiler.h>
> +#include <linux/sched/clock.h>

That's needed because?

>  #include "tick-internal.h"
>  #include "ntp_internal.h"
> @@ -60,8 +61,39 @@ struct tk_fast {
>  	struct tk_read_base	base[2];
>  };
>  
> -static struct tk_fast tk_fast_mono ____cacheline_aligned;
> -static struct tk_fast tk_fast_raw  ____cacheline_aligned;
> +/* Suspend-time cycles value for halted fast timekeeper. */
> +static u64 cycles_at_suspend;
> +
> +static u64 dummy_clock_read(struct clocksource *cs)
> +{
> +	return cycles_at_suspend;
> +}
> +
> +static struct clocksource dummy_clock = {
> +	.read = dummy_clock_read,
> +};
> +
> +static struct tk_fast tk_fast_mono ____cacheline_aligned = {
> +	.base = {
> +		(struct tk_read_base){

Eew.

> +			.clock = &dummy_clock,
> +		},

	.base[0] = {
		.clock = &dummy_clock,
	},

	.base[1] = {
		.clock = &dummy_clock,
	},

Hmm?

> -static struct clocksource dummy_clock = {
> -	.read = dummy_clock_read,
> -};
> -

Can we please have that timekeeping change as a seperate patch?

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ