aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen-bus-helper.c
diff options
context:
space:
mode:
authorDaniele Buono <dbuono@linux.vnet.ibm.com>2020-05-29 16:51:20 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2020-06-23 15:46:05 +0100
commitff76097ad8f7fdc9d1d707bed85c146fdbb5a16d (patch)
tree05dffbd02e80a7890ca8f1526ab785b16eb9f6c0 /hw/xen/xen-bus-helper.c
parent58ebc2c31337734a8a79b0566b31b19040deb2ea (diff)
downloadqemu-ff76097ad8f7fdc9d1d707bed85c146fdbb5a16d.zip
qemu-ff76097ad8f7fdc9d1d707bed85c146fdbb5a16d.tar.gz
qemu-ff76097ad8f7fdc9d1d707bed85c146fdbb5a16d.tar.bz2
coroutine: add check for SafeStack in sigaltstack
Current implementation of LLVM's SafeStack is not compatible with code that uses an alternate stack created with sigaltstack(). Since coroutine-sigaltstack relies on sigaltstack(), it is not compatible with SafeStack. The resulting binary is incorrect, with different coroutines sharing the same unsafe stack and producing undefined behavior at runtime. In the future LLVM may provide a SafeStack implementation compatible with sigaltstack(). In the meantime, if SafeStack is desired, the coroutine implementation from coroutine-ucontext should be used. As a safety check, add a control in coroutine-sigaltstack to throw a preprocessor #error if SafeStack is enabled and we are trying to use coroutine-sigaltstack to implement coroutines. Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com> Message-id: 20200529205122.714-3-dbuono@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/xen/xen-bus-helper.c')
0 files changed, 0 insertions, 0 deletions