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:	Mon, 9 Sep 2013 09:06:54 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	David Vrabel <david.vrabel@...rix.com>
Cc:	Konrad Rzeszutek Wilk <konrad@...nel.org>,
	linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org,
	boris.ostrovsky@...cle.com, stefan.bader@...onical.com,
	stefano.stabellini@...citrix.com, jeremy@...p.org
Subject: Re: [PATCH 1/5] xen/spinlock: Fix locking path engaging too soon
 under PVHVM.

On Mon, Sep 09, 2013 at 11:31:23AM +0100, David Vrabel wrote:
> On 07/09/13 14:46, Konrad Rzeszutek Wilk wrote:
> > The xen_lock_spinning has a check for the kicker interrupts
> > and if it is not initialised it will spin normally (not enter
> > the slowpath).
> > 
> > But for PVHVM case we would initialise the kicker interrupt
> > before the CPU came online. This meant that if the booting
> > CPU used a spinlock and went in the slowpath - it would
> > enter the slowpath and block forever. The forever part b/c
> 
> b/c? Ewww.  Proper English please.
> 
> > during bootup the interrupts are disabled - so the CPU would
> > never get an IPI kick and would stay stuck in the slowpath
> > logic forever.
> 
> This description isn't right -- VCPUs blocked in SCHEDOP_poll can be
> unblocked on the event they're waiting for even if local irq delivery is
> disabled.
> 
> > Why would the booting CPU never get an IPI kick? B/c in both
> > PV and PVHVM we consult the cpu_online_mask to determine whether
> > the IPI should go to its CPU destination. Since the booting
> > CPU has not yet finished and set that flag, it meant that
> > if any spinlocks were taken before the booting CPU had gotten to:
> 
> I can't find where the online mask is being checked in
> xen_send_IPI_one().  Is this really the reason why it didn't work?

More details in fc78d343fa74514f6fd117b5ef4cd27e4ac30236
Author: Chuck Anderson <chuck.anderson@...cle.com>
Date:   Tue Aug 6 15:12:19 2013 -0700

    xen/smp: initialize IPI vectors before marking CPU online

I will add that part in.
> 
> This fix looks fine but both the description and the comment need to be
> fixed/clarified.

U r Right!

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