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: <CA+55aFzGN59W5zhmc-kicQrpomAKLiwX4yBUsNcagwmM=Z8jxw@mail.gmail.com>
Date:	Mon, 16 Jan 2012 16:52:07 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Suresh Siddha <suresh.b.siddha@...el.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	asit.k.mallick@...el.com
Subject: Re: [patch] x86, tsc: fix SMI induced variation in quick_pit_calibrate()

On Mon, Jan 16, 2012 at 4:41 PM, Suresh Siddha
<suresh.b.siddha@...el.com> wrote:
>
> also may be we should change the correction
>
> from: delta += (long)(d2 - d1)/2;
> to:   delta += (long)(d2 - d1)/4;
>
> I will give this patch a try.

Hmm. I get the feeling that we should remove that line entirely.

I think it actually makes the 'delta' less precise - the "d2-d1" thing
is how much of a difference there was in the first and last PIT MSB
differences, but while that difference might give some kind of error
estimate for how close we can expect 'delta' to be from correct, I
don't think we can really *add* that error to 'delta'. We might as
well subtract it (and we do - the sign is random and depends on which
one happened to be longer).

So I think that line should go away entirely. It doesn't have any
meaning. Yes, 'delta' may not be exact, but we don't know which
direction to correct into, so..

I realize that I wrote it, and that it as such must be bug-free, but I
suspect that removing that line is even *more* bug-free.

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