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: <87d4aejw5b.fsf@depni.sinp.msu.ru>
Date:	Tue, 12 May 2009 17:20:00 +0400
From:	Serge Belyshev <belyshev@...ni.sinp.msu.ru>
To:	john stultz <johnstul@...ibm.com>
Cc:	George Spelvin <linux@...izon.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	ulrich.windl@...uni-regensburg.de, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, Clark Williams <williams@...hat.com>,
	zippel@...ux-m68k.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] tsc_khz= boot option to avoid TSC calibration variance

john stultz <johnstul@...ibm.com> writes:

> Once the tsc_khz value is set in grub, the box will always boot with the
                                                      ^^^^^^
> same value, so the NTP drift value prior to reboot will still be correct
> after rebooting.
No, it won't, because...

>  	tsc_khz = calibrate_tsc();
> +
> +	/*
> +	 * If the calibrated TSC freq and user specified
> +	 * TSC freq are close enough, pick the what the
> +	 * user told us.
> +	 */
> +	difference = abs(tsc_khz - tsc_khz_specified);
> +	if (difference <= tsc_khz >> 10) {      /* 1/1024 = 976 ppm */
> +		printk(KERN_INFO "Using user defined TSC freq: %lu.%03lu MHz\n",
> +			tsc_khz_specified/1000,
> +			tsc_khz_specified%1000);
> +		tsc_khz = tsc_khz_specified;
> +	}
> +

... of this "if".

Please *please* don't set arbitrary limits.  Just use user supplied value.

Or at the very least print big red warning if you are going to ignore a user
supplied option (and have another tsc_khz_really= option to override faulty
calibration routine).
--
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