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: <alpine.DEB.2.11.1511170956220.3761@nanos>
Date:	Tue, 17 Nov 2015 10:11:03 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Borislav Petkov <bp@...en8.de>
cc:	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>, x86-ml <x86@...nel.org>,
	Andy Lutomirski <luto@...capital.net>,
	Steven Rostedt <rostedt@...dmis.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH -v2.1] x86: Kill notsc

On Tue, 17 Nov 2015, Borislav Petkov wrote:
> On Mon, Nov 16, 2015 at 09:02:15PM -0800, H. Peter Anvin wrote:
> > On 11/16/15 13:25, Thomas Gleixner wrote:
> > > On Mon, 16 Nov 2015, Borislav Petkov wrote:
> > >> -/*
> > >> - * disable flag for tsc. Takes effect by clearing the TSC cpu flag
> > >> - * in cpu/common.c
> > >> - */
> > >> -int __init notsc_setup(char *str)
> > >> +/* Disable the TSC feature flag to avoid further TSC use. */
> > >> +int __init notsc_setup(void)
> > >>  {
> > >> +#ifndef CONFIG_X86_TSC
> > >>  	setup_clear_cpu_cap(X86_FEATURE_TSC);
> > > 
> > > This is silly, really.
> > > 
> > > If CONFIG_X86_TSC is disabled then we should just not compile tsc.c at
> > > all and map cpu_has_tsc and stuff depending on it to false.
> > > 
> > 
> > CONFIG_X86_TSC means TSC is obligatory, not that it is supported.
> 
> Hmm, I'd still need to untangle tsc.c though for people who want to
> disable it for whatever reason.

There is an interesting problem:

tsc_init()
{
       tsc_khz = x86_platform.calibrate_tsc();
       if (!tsc_khz) {
       	  mark_tsc_unstable("could not calculate TSC khz");
	  ...
       }

In the current code we do NOT use TSC for sched_clock() and that's
correct as we have no idea what the TSC frequency is.

With your changes that is not longer the case, so you end up with a
completely wreckaged sched clock.

Thanks,

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