[PATCH v2 0/4] make sigaltstack() compatible with swapcontext()

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

 



The following patches add the self-test for
sigaltstack(SS_DISABLE) inside the signal handler,
and allow an app to temporarily disable and re-enable
the sigaltstack within a sighandler.
This is needed to make sigaltstack() compatible with
swapcontext(): before using swapcontext() inside
the sighandler, the sigaltstack should be disabled, or
the stack will be corrupted by the subsequent signals.


v2: avoid duplicating the "!sigstack" check in get_sigframe()
as requested by Andy Lutomirski.



 arch/score/kernel/signal.c                   |    2
 arch/x86/kernel/signal.c                     |    2
 include/linux/sched.h                        |    8 +
 include/linux/signal.h                       |    2
 kernel/fork.c                                |    4
 kernel/signal.c                              |   54 +++++++----
 tools/testing/selftests/Makefile             |    1
 tools/testing/selftests/sigaltstack/Makefile |    8 +
tools/testing/selftests/sigaltstack/sas.c | 132 +++++++++++++++++++++++++++
 9 files changed, 189 insertions(+), 24 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux