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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Jul 2008 16:59:50 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Martin Wilck <martin.wilck@...itsu-siemens.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Wichert, Gerhard" <Gerhard.Wichert@...itsu-siemens.com>,
	"Maciej W. Rozycki" <macro@...ux-mips.org>
Subject: Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe (take 2)

[Martin Wilck - Fri, Jul 25, 2008 at 02:29:23PM +0200]
> Cyrill Gorcunov wrote:
>
>> Hi Martin, what about the patch below - I simplified it a bit.
>> Actually we have to handle 32bit mode as well I think.
>
> Yes.
>
>> Anyway,
>> take a look. I don't really mind against your patch but we better
>> should wait until Maciej could take a look (he will be able in
>> a week or maybe a bit later).
>>
>
>> +       for (i = 0; i < MAX_ITER; i++) {
>> +               rdtscll(tsc0);
>> +               *apic = apic_read(APIC_TMCCT);
>> +               rdtscll(tsc1);
>> +               diff = tsc1 - tsc0;
>> +               if (diff < MAX_DIFFERENCE) {
>> +                       *tsc = tsc0 + diff / 2;
>> +                       return 0;
>> +               }
>> +       }
> > +
> > +       return -EIO ;
>
> This is wrong - you need to set *tsc also in the -EIO case, otherwise  
> the function can return total bogus.

indeed, thanks! that is not the only problem - I also initialized 'i'
twice :)

>
> I have to say that my simplified patch failed to do the calibration  
> correctly on our test system (the original patch worked well). Please  
> stay tuned, we are investigating this currently.
>
> Martin
>

ok, Martin, I'm leaving for vacation soon - hope someone else could
take a look :)

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