Re: [musl] Re: [RFC PATCH] x86/vdso/32: Add AT_SYSINFO cancellation helpers

From: Ingo Molnar
Date: Sat Mar 12 2016 - 12:09:14 EST



(Argh: Mail-Followup-To spam your mailer sets up is nasty!)

* Szabolcs Nagy <nsz@xxxxxxxxxx> wrote:

> > 4. A calls cancellation point and syscall correctly executes
> > 5. Once A enables cancellation again, the cancellation propagates.
> >
> > So I still see no problem.
>
> i think the sticky signal design would work, but more
> complex than what we have and adds some atomic rmw ops
> into common code paths and not backward compatible.

Agreed about complexity, but note that the RMW ops shouldn't really be expensive
here, as this should be a well-cached flag. Especially compared to:

> not using vsyscalls for cancellation-points sounds easier.

... FYI not using vsyscalls has _far_ higher cost than using well-cached RMW ops.

So ... what do you think about Linus's SA_SYNCHRONOUS approach? I think it can be
made to work without much fuss.

There will still be different code paths on old and new kernels, but that's
unavoidable.

Thanks,

Ingo