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] [day] [month] [year] [list]
Date:	Fri, 29 May 2015 16:41:00 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Vitaly Kuznetsov <vkuznets@...hat.com>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>
CC:	Haiyang Zhang <haiyangz@...rosoft.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Dexuan Cui <decui@...rosoft.com>,
	Ingo Molnar <mingo@...nel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Radim Krčmář <rkrcmar@...hat.com>
Subject: RE: [PATCH v2 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable



> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> Sent: Thursday, May 21, 2015 9:22 AM
> To: devel@...uxdriverproject.org
> Cc: KY Srinivasan; Haiyang Zhang; linux-kernel@...r.kernel.org; Dexuan Cui;
> Ingo Molnar; Paul E. McKenney; Rafael J. Wysocki; Peter Zijlstra; Thomas
> Gleixner; Radim Krčmář
> Subject: [PATCH v2 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable
> 
> Commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer
> hypervisors") was altering smp_ops.cpu_disable to prevent CPU offlining.
> We can bo better by using cpu_hotplug_enable/disable functions instead of
> such hard-coding.
> 
> Reported-by: Radim Krčmář <rkrcmar@...hat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>

This patch does not apply. Vitaly, could you rebase this on Greg's tree and re-submit.

Regards,

K. Y


> ---
>  drivers/hv/vmbus_drv.c | 38 ++++----------------------------------
>  1 file changed, 4 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index c85235e..e916ba2 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -763,38 +763,6 @@ static void vmbus_isr(void)
>  	}
>  }
> 
> -#ifdef CONFIG_HOTPLUG_CPU
> -static int hyperv_cpu_disable(void)
> -{
> -	return -ENOSYS;
> -}
> -
> -static void hv_cpu_hotplug_quirk(bool vmbus_loaded)
> -{
> -	static void *previous_cpu_disable;
> -
> -	/*
> -	 * Offlining a CPU when running on newer hypervisors (WS2012R2,
> Win8,
> -	 * ...) is not supported at this moment as channel interrupts are
> -	 * distributed across all of them.
> -	 */
> -
> -	if ((vmbus_proto_version == VERSION_WS2008) ||
> -	    (vmbus_proto_version == VERSION_WIN7))
> -		return;
> -
> -	if (vmbus_loaded) {
> -		previous_cpu_disable = smp_ops.cpu_disable;
> -		smp_ops.cpu_disable = hyperv_cpu_disable;
> -		pr_notice("CPU offlining is not supported by hypervisor\n");
> -	} else if (previous_cpu_disable)
> -		smp_ops.cpu_disable = previous_cpu_disable;
> -}
> -#else
> -static void hv_cpu_hotplug_quirk(bool vmbus_loaded)
> -{
> -}
> -#endif
> 
>  /*
>   * vmbus_bus_init -Main vmbus driver initialization routine.
> @@ -836,7 +804,8 @@ static int vmbus_bus_init(int irq)
>  	if (ret)
>  		goto err_alloc;
> 
> -	hv_cpu_hotplug_quirk(true);
> +	if (vmbus_proto_version > VERSION_WIN7)
> +		cpu_hotplug_disable();
> 
>  	/*
>  	 * Only register if the crash MSRs are available
> @@ -1103,7 +1072,8 @@ static void __exit vmbus_exit(void)
>  	for_each_online_cpu(cpu)
>  		smp_call_function_single(cpu, hv_synic_cleanup, NULL, 1);
>  	acpi_bus_unregister_driver(&vmbus_acpi_driver);
> -	hv_cpu_hotplug_quirk(false);
> +	if (vmbus_proto_version > VERSION_WIN7)
> +		cpu_hotplug_enable();
>  	vmbus_disconnect();
>  }
> 
> --
> 1.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ