diff options
author | Richard Weinberger <richard@nod.at> | 2014-03-05 13:31:20 +0100 |
---|---|---|
committer | Richard Weinberger <richard@sigma-star.at> | 2014-08-06 13:03:45 +0200 |
commit | 38a7be3c280bb9f9c4c892cf5ff51c847e959cf1 (patch) | |
tree | a50c1b3486c3adac679682a602cba944f7b6c388 /arch/arm64/kernel/signal32.c | |
parent | 5290dd79c0219fd2b90784d66a54d00880a21520 (diff) | |
download | linux-stable-38a7be3c280bb9f9c4c892cf5ff51c847e959cf1.tar.gz linux-stable-38a7be3c280bb9f9c4c892cf5ff51c847e959cf1.tar.bz2 linux-stable-38a7be3c280bb9f9c4c892cf5ff51c847e959cf1.zip |
arm64: Use sigsp()
Use sigsp() instead of the open coded variant.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/arm64/kernel/signal32.c')
-rw-r--r-- | arch/arm64/kernel/signal32.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index b69ee6921c48..1a5c5bfa8ea4 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c @@ -407,20 +407,14 @@ badframe: return 0; } -static void __user *compat_get_sigframe(struct k_sigaction *ka, +static void __user *compat_get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize) { - compat_ulong_t sp = regs->compat_sp; + compat_ulong_t sp = sigsp(regs->compat_sp, ksig); void __user *frame; /* - * This is the X/Open sanctioned signal stack switching. - */ - if ((ka->sa.sa_flags & SA_ONSTACK) && !sas_ss_flags(sp)) - sp = current->sas_ss_sp + current->sas_ss_size; - - /* * ATPCS B01 mandates 8-byte alignment */ frame = compat_ptr((compat_uptr_t)((sp - framesize) & ~7)); @@ -526,7 +520,7 @@ int compat_setup_rt_frame(int usig, struct ksignal *ksig, struct compat_rt_sigframe __user *frame; int err = 0; - frame = compat_get_sigframe(&ksig->ka, regs, sizeof(*frame)); + frame = compat_get_sigframe(ksig, regs, sizeof(*frame)); if (!frame) return 1; @@ -555,7 +549,7 @@ int compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set, struct compat_sigframe __user *frame; int err = 0; - frame = compat_get_sigframe(&ksig->ka, regs, sizeof(*frame)); + frame = compat_get_sigframe(ksig, regs, sizeof(*frame)); if (!frame) return 1; |