Files
kernel_arpi/include/uapi/linux
Stas Sergeev 2a74213838 signals/sigaltstack: Implement SS_AUTODISARM flag
This patch implements the SS_AUTODISARM flag that can be OR-ed 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.

To detect the support of this functionality, one can do:

  err = sigaltstack(SS_DISABLE | SS_AUTODISARM);
  if (err && errno == EINVAL)
	unsupported();

Signed-off-by: Stas Sergeev <stsp@list.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Aleksa Sarai <cyphar@cyphar.com>
Cc: Amanieu d'Antras <amanieu@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Jason Low <jason.low2@hp.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Moore <pmoore@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: linux-api@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/1460665206-13646-4-git-send-email-stsp@list.ru
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-05-03 08:37:59 +02:00
..
2015-10-13 17:42:34 +02:00
2016-01-30 16:27:17 +00:00
2015-04-21 16:16:02 -04:00
2016-03-01 17:15:22 -05:00
2015-10-05 03:16:46 -07:00
2016-03-15 16:55:16 -07:00
2016-03-01 16:07:29 -05:00
2015-08-25 14:41:50 -05:00
2016-03-22 15:45:44 -04:00
2016-01-20 17:09:18 -08:00
2015-04-12 21:25:13 -04:00
2015-12-14 12:19:37 -06:00
2016-03-10 16:02:52 +07:00
2016-03-13 22:40:24 -04:00
2016-03-18 19:40:27 -04:00
2015-05-25 13:25:35 -04:00
2016-04-11 21:33:44 -04:00
2016-03-22 15:36:02 -07:00
2015-02-17 14:34:51 -08:00
2016-01-12 08:21:18 -07:00
2015-08-03 17:30:00 -07:00
2015-07-21 10:39:05 -07:00
2015-11-23 15:06:38 -05:00
2015-01-20 13:51:06 +01:00
2014-12-13 12:42:52 -08:00
2015-05-05 13:40:44 -06:00
2015-02-02 18:46:51 -08:00
2015-08-27 19:44:53 -04:00
2015-04-23 15:16:14 -04:00
2015-07-20 14:58:46 -04:00
2016-02-24 09:04:41 +01:00
2016-03-14 23:47:29 +01:00
2016-01-10 22:13:15 -05:00
2015-09-04 16:54:41 -07:00
2016-02-08 11:22:21 +11:00
2014-12-10 17:41:10 -08:00
2014-12-09 14:10:41 +08:00
2015-03-05 22:08:42 -05:00
2015-05-24 12:49:16 -07:00
2015-06-11 23:37:37 +02:00
2015-12-18 17:48:51 -08:00
2015-10-27 18:55:31 -07:00
2016-03-11 02:18:53 +02:00
2015-03-29 12:13:52 +10:30
2014-12-09 12:05:24 +02:00
2015-03-31 13:58:35 -04:00