[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread safety of coroutine-sigaltstack

From: Paolo Bonzini
Subject: Re: Thread safety of coroutine-sigaltstack
Date: Thu, 21 Jan 2021 18:24:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 21/01/21 17:44, Peter Maydell wrote:
On Thu, 21 Jan 2021 at 16:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
FWIW The libucontext impl is all ASM based and has coverage for all the
arches we care about:


so doesn't seem like there's a need for  coroutine-asm if we can rely
on libucontext for portability where neede.

The README for that notes a couple of pretty major omissions:
  * it doesn't handle floating point registers
  * it doesn't do anything about the signal mask
I'm pretty sure that not handling the fp regs could cause breakage
for Arm at least (depending on what the compiler chooses to do
in the functions that work with the ucontext functions). The
signal mask stuff might be OK for us because of the carefully
limited use we make of the ucontext functions, but it would be
a bit of a pain to have to analyse that code for both sets of semantics.

The lack of signal mask handling is an improvement for us. :) We want the signal mask to be per thread, not per coroutine.

Floating point however is an issue if they don't save-restore v8-v15 (for aarch64, I don't remember what the AAPCS32 says).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]