diff options
author | Will Newton <will.newton@linaro.org> | 2014-03-12 16:14:51 +0000 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2014-04-17 11:38:50 +0100 |
commit | 37d350073888887637aa67dddf988d9c4b226032 (patch) | |
tree | a893453561890056eca3e79e58e0564b15b8b10d /NEWS | |
parent | 423a7160af7fcffc61aac5e2e36d0b6b5b083214 (diff) | |
download | glibc-37d350073888887637aa67dddf988d9c4b226032.zip glibc-37d350073888887637aa67dddf988d9c4b226032.tar.gz glibc-37d350073888887637aa67dddf988d9c4b226032.tar.bz2 |
aarch64: Re-implement setcontext without rt_sigreturn syscall
The current implementation of setcontext uses rt_sigreturn to restore
the contents of registers. This contrasts with the way most other
architectures implement setcontext:
powerpc64, mips, tile:
Call rt_sigreturn if context was created by a call to a signal handler,
otherwise restore in user code.
powerpc32:
Call swapcontext system call and don't call sigreturn or rt_sigreturn.
x86_64, sparc, hppa, sh, ia64, m68k, s390, arm:
Only support restoring "synchronous" contexts, that is contexts
created by getcontext, and restoring in user code and don't call
sigreturn or rt_sigreturn.
alpha:
Call sigreturn (but not rt_sigreturn) in all cases to do the restore.
The text of the setcontext manpage suggests that the requirement to be
able to restore a signal handler created context has been dropped from
SUSv2:
If the context was obtained by a call to a signal handler, then old
standard text says that "program execution continues with the program
instruction following the instruction interrupted by the signal".
However, this sentence was removed in SUSv2, and the present verdict
is "the result is unspecified".
Implementing setcontext by calling rt_sigreturn unconditionally causes
problems when used with sigaltstack as in BZ #16629. On this basis it
seems that aarch64 is broken and that new ports should only support
restoring contexts created with getcontext and do not need to call
rt_sigreturn at all.
This patch re-implements the aarch64 setcontext function to restore
the context in user code in a similar manner to x86_64 and other ports.
ChangeLog:
2014-04-17 Will Newton <will.newton@linaro.org>
[BZ #16629]
* sysdeps/unix/sysv/linux/aarch64/setcontext.S (__setcontext):
Re-implement to restore registers in user code and avoid
rt_sigreturn system call.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -11,11 +11,11 @@ Version 2.20 6804, 13347, 14770, 15347, 15514, 15804, 15894, 16002, 16198, 16284, 16348, 16349, 16357, 16362, 16447, 16532, 16545, 16574, 16599, 16600, - 16609, 16610, 16611, 16613, 16619, 16623, 16632, 16634, 16639, 16642, - 16648, 16649, 16670, 16674, 16677, 16680, 16683, 16689, 16695, 16701, - 16706, 16707, 16712, 16713, 16714, 16731, 16739, 16740, 16743, 16758, - 16759, 16760, 16770, 16786, 16789, 16799, 16800, 16815, 16824, 16831, - 16838. + 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, + 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16683, 16689, 16695, + 16701, 16706, 16707, 16712, 16713, 16714, 16731, 16739, 16740, 16743, + 16758, 16759, 16760, 16770, 16786, 16789, 16799, 16800, 16815, 16824, + 16831, 16838. * Running the testsuite no longer terminates as soon as a test fails. Instead, a file tests.sum (xtests.sum from "make xcheck") is generated, |