aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2014-07-15 17:01:55 +0300
committerRiku Voipio <riku.voipio@linaro.org>2014-07-15 17:08:41 +0300
commitb545f63fa974ebffd55d70ca615572d497e543dc (patch)
treed43ea6d28b6b7b6c7825aae276e1b2eb5f18ccd5 /linux-user
parent2dd08dfd9a553af3d53c6508e436b0c2aa5a469b (diff)
downloadqemu-b545f63fa974ebffd55d70ca615572d497e543dc.zip
qemu-b545f63fa974ebffd55d70ca615572d497e543dc.tar.gz
qemu-b545f63fa974ebffd55d70ca615572d497e543dc.tar.bz2
linux-user: use TARGET_SA_ONSTACK in get_sigframe
As reported by Laurent, which should use TARGET_SA_ONSTACK on arm, microblaze and openrisc targets like we do on all others. Practical matter is minimal as for almost all archs SA_ONSTACK is 0x08000000: http://lxr.free-electrons.com/ident?i=SA_ONSTACK Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/signal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index f3b4378..1141054 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -1305,7 +1305,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka, CPUARMState *env)
/*
* This is the X/Open sanctioned signal stack switching.
*/
- if ((ka->sa_flags & SA_ONSTACK) && !sas_ss_flags(sp)) {
+ if ((ka->sa_flags & TARGET_SA_ONSTACK) && !sas_ss_flags(sp)) {
sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;
}
@@ -3509,8 +3509,9 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
{
abi_ulong sp = env->regs[1];
- if ((ka->sa_flags & SA_ONSTACK) != 0 && !on_sig_stack(sp))
+ if ((ka->sa_flags & TARGET_SA_ONSTACK) != 0 && !on_sig_stack(sp)) {
sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;
+ }
return ((sp - frame_size) & -8UL);
}
@@ -3891,7 +3892,7 @@ static inline abi_ulong get_sigframe(struct target_sigaction *ka,
/* redzone */
/* This is the X/Open sanctioned signal stack switching. */
- if ((ka->sa_flags & SA_ONSTACK) != 0 && !onsigstack) {
+ if ((ka->sa_flags & TARGET_SA_ONSTACK) != 0 && !onsigstack) {
sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;
}