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]
Date:	Thu, 23 Jan 2014 08:32:35 -0500
From:	Josh Boyer <jwboyer@...oraproject.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Markus Trippelsdorf <markus@...ppelsdorf.de>,
	Sasha Levin <sasha.levin@...cle.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Len Brown <lenb@...nel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Eliezer Tamir <eliezer.tamir@...ux.intel.com>,
	Zhang Rui <rui.zhang@...el.com>, jacob.jun.pan@...ux.intel.com,
	Mike Galbraith <bitbucket@...ine.de>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <john.stultz@...aro.org>,
	Andy Lutomirski <luto@...capital.net>,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	Dave Young <dyoung@...hat.com>
Subject: Re: [PATCH 13/15] sched: Use a static_key for sched_clock_stable

On Thu, Jan 23, 2014 at 4:48 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Wed, Jan 22, 2014 at 10:17:40PM +0100, Markus Trippelsdorf wrote:
>> Yes. Thanks Peter.
>>
>
> Ah much simpler patch that should have the same effect:

This fixes the issue on my baremetal i7 machine as well.

josh

> ---
> Subject: sched/x86/tsc: Initialize multiplier to 0
> From: Peter Zijlstra <peterz@...radead.org>
> Date: Wed, 22 Jan 2014 22:08:14 +0100
>
> Since we keep the clock value linearly continuous on frequency change,
> make sure the initial multiplier is 0, such that out initial value is
> 0. Without this we compute the initial value at whatever the TSC has
> managed to reach since power-on.
>
> Fixes: 20d1c86a57762 ("sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs")
> Cc: lenb@...nel.org
> Cc: rjw@...ysocki.net
> Cc: Eliezer Tamir <eliezer.tamir@...ux.intel.com>
> Cc: rui.zhang@...el.com
> Cc: jacob.jun.pan@...ux.intel.com
> Cc: Mike Galbraith <bitbucket@...ine.de>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: hpa@...or.com
> Cc: paulmck@...ux.vnet.ibm.com
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: John Stultz <john.stultz@...aro.org>
> Cc: Andy Lutomirski <luto@...capital.net>
> Cc: Arjan van de Ven <arjan@...ux.intel.com>
> Cc: Sasha Levin <sasha.levin@...cle.com>
> Cc: dyoung@...hat.com
> Reported-by: Markus Trippelsdorf <markus@...ppelsdorf.de>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> ---
>  arch/x86/kernel/tsc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -180,7 +180,7 @@ static void cyc2ns_write_end(int cpu, st
>
>  static void cyc2ns_data_init(struct cyc2ns_data *data)
>  {
> -       data->cyc2ns_mul = 1U << CYC2NS_SCALE_FACTOR;
> +       data->cyc2ns_mul = 0;
>         data->cyc2ns_shift = CYC2NS_SCALE_FACTOR;
>         data->cyc2ns_offset = 0;
>         data->__count = 0;
> --
> 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/
--
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