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]
Date:	Fri, 14 Aug 2009 10:17:01 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Martin Schwidefsky <schwidefsky@...ibm.com>
cc:	john stultz <johnstul@...ibm.com>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>, Daniel Walker <dwalker@...o99.com>
Subject: Re: [patch 02/14] remove clocksource inline functions

On Fri, 14 Aug 2009, Martin Schwidefsky wrote:
> On Thu, 13 Aug 2009 15:14:34 -0700
> john stultz <johnstul@...ibm.com> wrote:
> > So you'll need to preserve the cycle_last = 0 line.
> 
> Whoa, now that is subtle. Good spotting. I would prefer to reset the 
> cycle_last in a resume function though:
> 
> Index: linux-2.6/arch/x86/kernel/tsc.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/tsc.c
> +++ linux-2.6/arch/x86/kernel/tsc.c
> @@ -744,10 +744,16 @@ static cycle_t __vsyscall_fn vread_tsc(v
>  }
>  #endif
> 
> +static void resume_tsc(void)
> +{
> +       clocksource_tsc.cycle_last = 0;
> +}
> +
>  static struct clocksource clocksource_tsc = {
>         .name                   = "tsc",
>         .rating                 = 300,
>         .read                   = read_tsc,
> +       .resume                 = resume_tsc,
>         .mask                   = CLOCKSOURCE_MASK(64),
>         .shift                  = 22,
>         .flags                  = CLOCK_SOURCE_IS_CONTINUOUS |
> 
> That puts the subtlety where it belongs.

Ack.

	tglx
--
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