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]
Message-ID: <20110114162845.GB12102@dumpdata.com>
Date:	Fri, 14 Jan 2011 11:28:45 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	john stultz <johnstul@...ibm.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Ian Campbell <Ian.Campbell@...citrix.com>, mingo@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org, andi@...stfloor.org,
	williams@...hat.com, schwidefsky@...ibm.com, mingo@...e.hu,
	linux-tip-commits@...r.kernel.org
Subject: Re: [PATCH] acpi/pm: If failed at validating ACPI PM timer,
 inhibit future reads.

On Fri, Jan 14, 2011 at 07:54:47AM -0800, john stultz wrote:
> On Fri, 2011-01-14 at 07:44 -0800, john stultz wrote:
> > I'm actually looking at a different fix, as I'm worried by Thomas'
> > comment about hitting the same issue on real hardware if we catch the
> > same pmtrm value both times.
> 
> Konrad: Mind trying the following?
> 
> 
> The conditional (!hpet && !ref_start && !ref_stop) doesn't really make
> sense. If the refs are null, but hpet is on, we still want to break out.
> 
> So checking if both the ref values are the same should handle if we
> don't have hardware (both null) or if they are the same value (either by
> invalid hardware, or by chance), which can cause a divzero issue.
> 
> NOT FOR INCLUSION, I haven't had my coffee yet.
> Signed-off-by: John Stultz <johnstul@...ibm.com>

Works great. (I pulled out my patch to test this).

Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>

> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index 823f79a..fa2cb5e 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -935,7 +935,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
>  	tsc_stop = tsc_read_refs(&ref_stop, hpet);
>  
>  	/* hpet or pmtimer available ? */
> -	if (!hpet && !ref_start && !ref_stop)
> +	if (ref_start == ref_stop)
>  		goto out;
>  
>  	/* Check, whether the sampling was disturbed by an SMI */
> 
> 
> 
--
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