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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 11 Jan 2011 07:46:46 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	linux-kernel@...r.kernel.org, mingo@...hat.com, hpa@...or.com,
	tglx@...utronix.de, kas@...nvz.org
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86: tsc: Prevent delayed init if initial tsc
 calibration failed

On Tue, 2011-01-11 at 10:51 +0000, tip-bot for Thomas Gleixner wrote:
> Commit-ID:  29fe359ca20326e57b25e8545c49ed9ff5e830c7
> Gitweb:     http://git.kernel.org/tip/29fe359ca20326e57b25e8545c49ed9ff5e830c7
> Author:     Thomas Gleixner <tglx@...utronix.de>
> AuthorDate: Tue, 11 Jan 2011 11:40:48 +0100
> Committer:  Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Tue, 11 Jan 2011 11:48:39 +0100
> 
> x86: tsc: Prevent delayed init if initial tsc calibration failed
> 
> commit a8760ec (x86: Check tsc available/disabled in the delayed init
> function) missed to prevent the setup of the delayed init function in
> case the initial tsc calibration failed. This results in the same
> divide by zero bug as we have seen without the tsc disabled check.
> 
> Skip the delayed work setup when tsc_khz (the initial calibration
> value) is 0.
> 
> Bisected-and-tested-by: Kirill A. Shutemov <kas@...nvz.org>
> Cc: John Stultz <john.stultz@...aro.org>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Krill: Thanks for reporting and testing!

Thomas: Thanks for the fix. I'll see if we can't condense the invalid
states a bit more. If tsc_khz=0, we probably should set tsc_disabled.

Acked-by: John Stultz <johnstul@...ibm.com>

> ---
>  arch/x86/kernel/tsc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index 356a0d4..463901e 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -965,7 +965,7 @@ out:
> 
>  static int __init init_tsc_clocksource(void)
>  {
> -	if (!cpu_has_tsc || tsc_disabled > 0)
> +	if (!cpu_has_tsc || tsc_disabled > 0 || !tsc_khz)
>  		return 0;
> 
>  	if (tsc_clocksource_reliable)


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