Thread (13 messages) 13 messages, 3 authors, 2016-03-06

Re: [PATCH 1/2] sigaltstack: implement SS_AUTODISARM flag

From: Andy Lutomirski <hidden>
Date: 2016-03-04 22:22:47
Also in: lkml

On Mon, Feb 29, 2016 at 1:29 PM, Stas Sergeev [off-list ref] wrote:
This patch implements the SS_AUTODISARM flag that can be ORed with
SS_ONSTACK when forming ss_flags.
When this flag is set, sigaltstack will be disabled when entering
the signal handler; more precisely, after saving sas to uc_stack.
When leaving the signal handler, the sigaltstack is restored by
uc_stack.
When this flag is used, it is safe to switch from sighandler with
swapcontext(). Without this flag, the subsequent signal will corrupt
the state of the switched-away sighandler.
This looks reasonable to me with one exception: how does a user
program detect the presence of this feature?  Anyone else have any
thoughts?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help