Davidlohr Bueso
2015-Feb-06 19:42 UTC
[PATCH] x86 spinlock: Fix memory corruption on completing completions
On Fri, 2015-02-06 at 08:25 -0800, Linus Torvalds wrote:> On Fri, Feb 6, 2015 at 6:49 AM, Raghavendra K T > <raghavendra.kt at linux.vnet.ibm.com> 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.
Sasha Levin
2015-Feb-06 21:15 UTC
[PATCH] x86 spinlock: Fix memory corruption on completing completions
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 >> <raghavendra.kt at linux.vnet.ibm.com> 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. I tried it and other unrelated stuff broke. I'll send separate mails for that... Thanks, Sasha
Davidlohr Bueso
2015-Feb-06 23:24 UTC
[PATCH] x86 spinlock: Fix memory corruption on completing completions
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 > >> <raghavendra.kt at linux.vnet.ibm.com> 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
Possibly Parallel Threads
- [PATCH] x86 spinlock: Fix memory corruption on completing completions
- [PATCH] x86 spinlock: Fix memory corruption on completing completions
- [PATCH] x86 spinlock: Fix memory corruption on completing completions
- [PATCH] x86 spinlock: Fix memory corruption on completing completions
- [PATCH] x86 spinlock: Fix memory corruption on completing completions