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:	Wed, 18 Jul 2007 19:59:32 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>, Andi Kleen <ak@...e.de>,
	Stable Team <stable@...nel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] X86_64: hpet tsc calibration fix broken smi detection
 logic

On Sat, 14 Jul 2007 10:41:39 +0200 Thomas Gleixner <tglx@...utronix.de> wrote:

> The current SMI detection logic in read_hpet_tsc() makes sure,
> that when a SMI happens between the read of the HPET counter and
> the read of the TSC, this wrong value is used for TSC calibration.
> 
> This is not the intention of the function. The comparison must ensure,
> that we do _NOT_ use such a value.
> 
> Fix the check to use calibration values where delta of the two TSC reads
> is smaller than a reasonable threshold.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> 
> --- a/arch/x86_64/kernel/hpet.c
> +++ b/arch/x86_64/kernel/hpet.c
> @@ -190,7 +190,7 @@ int hpet_reenable(void)
>   */
>  
>  #define TICK_COUNT 100000000
> -#define TICK_MIN   5000
> +#define SMI_THRESHOLD 50000
>  #define MAX_TRIES  5
>  
>  /*
> @@ -205,7 +205,7 @@ static void __init read_hpet_tsc(int *hpet, int *tsc)
>  		tsc1 = get_cycles_sync();
>  		hpet1 = hpet_readl(HPET_COUNTER);
>  		tsc2 = get_cycles_sync();
> -		if (tsc2 - tsc1 > TICK_MIN)
> +		if ((tsc2 - tsc1) < SMI_TRESHOLD)
>  			break;
>  	}
>  	*hpet = hpet1;
> 

So I queued this, and then another patch to revert it so that the
x86_64-clockevents conversion would apply.  But I was unable to locate the
corresponding bug in the post-x86_64-clockevents tree.  Did it get fixed by
other means in there?

-
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