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]
Message-ID: <20141016073048.GA19055@gmail.com>
Date:	Thu, 16 Oct 2014 09:30:48 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	konrad.wilk@...cle.com, david.vrabel@...rix.com,
	tianyu.lan@...el.com, linux-kernel@...r.kernel.org,
	xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] xen/smp: Use die_complete completion when taking CPU down


* Boris Ostrovsky <boris.ostrovsky@...cle.com> wrote:

> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index 8650cdb..4da0008 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -498,6 +498,7 @@ static int xen_cpu_disable(void)
>  	if (cpu == 0)
>  		return -EBUSY;
>  
> +	init_completion(&per_cpu(die_complete, smp_processor_id()));
>  	cpu_disable_common();
>  
>  	load_cr3(swapper_pg_dir);
> @@ -510,6 +511,9 @@ static void xen_cpu_die(unsigned int cpu)
>  		current->state = TASK_UNINTERRUPTIBLE;
>  		schedule_timeout(HZ/10);
>  	}
> +
> +	wait_for_completion_timeout(&per_cpu(die_complete, cpu), HZ);
> +
>  	xen_smp_intr_free(cpu);
>  	xen_uninit_lock_cpu(cpu);
>  	xen_teardown_timer(cpu);

So why not put it into cpu_disable_common() and do the same 
change for native_cpu_disable()?

Likewise, the waiting bit should be put into a common function as 
well (newly introduced, if need to be), we don't want to expose 
internal x86 core data structures to the Xen guest code.

Thanks,

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