Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1350646

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

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] sigaltstack: implement SS_AUTODISARM flag
Date 2016-03-04 23:30 +0100
Message-ID <r96op-5cc-11@gated-at.bofh.it> (permalink)
References <r7DHQ-8rB-15@gated-at.bofh.it> <r7DHR-8rB-51@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 29, 2016 at 1:29 PM, Stas Sergeev <stsp@list.ru> 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?

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/2] sigaltstack: implement SS_AUTODISARM flag Andy Lutomirski <luto@amacapital.net> - 2016-03-04 23:30 +0100
  Re: [PATCH 1/2] sigaltstack: implement SS_AUTODISARM flag Stas Sergeev <stsp@list.ru> - 2016-03-05 08:40 +0100
    Re: [PATCH 1/2] sigaltstack: implement SS_AUTODISARM flag Stas Sergeev <stsp@list.ru> - 2016-03-05 08:50 +0100

csiph-web