Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755455AbbBFXYV (ORCPT ); Fri, 6 Feb 2015 18:24:21 -0500 Received: from smtp2.provo.novell.com ([137.65.250.81]:55798 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbbBFXYT (ORCPT ); Fri, 6 Feb 2015 18:24:19 -0500 Message-ID: <1423265047.1057.8.camel@stgolabs.net> Subject: Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions From: Davidlohr Bueso To: Sasha Levin Cc: Linus Torvalds , Raghavendra K T , Thomas Gleixner , Ingo Molnar , Peter Anvin , Peter Zijlstra , Konrad Rzeszutek Wilk , Paolo Bonzini , Paul McKenney , Waiman Long , Dave Jones , Oleg Nesterov , the arch/x86 maintainers , Jeremy Fitzhardinge , Paul Gortmaker , Andi Kleen , Jason Wang , Linux Kernel Mailing List , KVM list , virtualization , xen-devel@lists.xenproject.org, Rik van Riel , Christian Borntraeger , Andrew Morton , Andrey Ryabinin Date: Fri, 06 Feb 2015 15:24:07 -0800 In-Reply-To: <54D52EDC.9000602@oracle.com> References: <1423234148-13886-1-git-send-email-raghavendra.kt@linux.vnet.ibm.com> <1423251764.1057.1.camel@stgolabs.net> <54D52EDC.9000602@oracle.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 37 On Fri, 2015-02-06 at 16:15 -0500, Sasha Levin wrote: > On 02/06/2015 02:42 PM, Davidlohr Bueso wrote: > > On Fri, 2015-02-06 at 08:25 -0800, Linus Torvalds wrote: > >> On Fri, Feb 6, 2015 at 6:49 AM, Raghavendra K T > >> wrote: > >>> Paravirt spinlock clears slowpath flag after doing unlock. > >> [ fix edited out ] > >> > >> So I'm not going to be applying this for 3.19, because it's much too > >> late and the patch is too scary. Plus the bug probably effectively > >> never shows up in real life (it is probably easy to trigger the > >> speculative *read* but probably never the actual speculative write > >> after dropping the lock last). > >> > >> This will need a lot of testing by the paravirt people - both > >> performance and correctness. So *maybe* for 3.20, but maybe for even > >> later, and then marked for stable, of course. > >> > >> Are there any good paravirt stress-tests that people could run for > >> extended times? > > > > locktorture inside a VM should give a proper pounding. > > Would it catch lifetime issues too? I thought it just tests out correctness. Given enough contention it should, yeah. The spinlock can be acquired by another thread right after releasing the lock in the unlock's slowpath. And all locktorture does is pound on locks with random hold times. Thanks, Davidlohr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/