Re: [PATCH 1/4] coroutine: support SafeStack in ucontext backend

2020-05-27 Thread Stefan Hajnoczi
On Fri, May 22, 2020 at 11:18:20AM -0400, Daniele Buono wrote: > On 5/21/2020 5:44 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 29, 2020 at 03:44:17PM -0400, Daniele Buono wrote: > > > @@ -160,6 +169,19 @@ Coroutine *qemu_coroutine_new(void) > > > /* swapcontext() in, siglongjmp() back out */ >

Re: [PATCH 1/4] coroutine: support SafeStack in ucontext backend

2020-05-22 Thread Daniele Buono
Hi Stefan, thank you so much for reviewing this. See my answers below: On 5/21/2020 5:44 AM, Stefan Hajnoczi wrote: On Wed, Apr 29, 2020 at 03:44:17PM -0400, Daniele Buono wrote: diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h index bd6b0468e1..2ffd75ddbe 100644 --- a/i

Re: [PATCH 1/4] coroutine: support SafeStack in ucontext backend

2020-05-21 Thread Stefan Hajnoczi
On Wed, Apr 29, 2020 at 03:44:17PM -0400, Daniele Buono wrote: > diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h > index bd6b0468e1..2ffd75ddbe 100644 > --- a/include/qemu/coroutine_int.h > +++ b/include/qemu/coroutine_int.h > @@ -28,6 +28,12 @@ > #include "qemu/queue.h" >

[PATCH 1/4] coroutine: support SafeStack in ucontext backend

2020-04-29 Thread Daniele Buono
LLVM's SafeStack instrumentation does not yet support programs that make use of the APIs in ucontext.h With the current implementation of coroutine-ucontext, the resulting binary is incorrect, with different coroutines sharing the same unsafe stack and producing undefined behavior at runtime. This