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]
Date:	Fri, 1 Apr 2016 18:10:03 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Andy Lutomirski <luto@...nel.org>
cc:	x86@...nel.org, Borislav Petkov <bp@...en8.de>,
	linux-kernel@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: [PATCH] x86: Add a turbo mode sysctl

On Fri, 1 Apr 2016, Andy Lutomirski wrote:
> +static void update_local_turbo_mode(void *dummy)
> +{
> +	unsigned long cr0 = read_cr0();
> +
> +	/*
> +	 * KVM doesn't properly handle CD.
> +	 *
> +	 * XXX: this may interact poorly with CPU hotplug.

Please cc these crazy folks who cleanup the hotplug mess so they can put it on
their todo list.

> +	 */
> +
> +	if (turbo_mode)
> +		write_cr0(cr0 & ~X86_CR0_CD);
> +	else
> +		write_cr0(cr0 | X86_CR0_CD);

I think proper turbo mode disable requires ~(X86_CR0_CD | X86_CR0_NW)

> +static void update_turbo_mode(void)
> +{
> +	on_each_cpu(update_local_turbo_mode, NULL, 1);
> +
> +	if (!turbo_mode)
> +		wbinvd();

You really want to do wbinvd() on each cpu to make sure that each cpu gets out
of that turbo thing.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ