@@ -60,7 +60,7 @@ asmlinkage int ilp32_sys_rt_sigreturn(struct pt_regs *regs)
if (restore_sigframe(regs, &frame->sig))
goto badframe;
- if (restore_altstack(&frame->sig.uc.uc_stack))
+ if (compat_restore_altstack(&frame->sig.uc.uc_stack))
goto badframe;
return regs->regs[0];
@@ -112,7 +112,7 @@ int ilp32_setup_rt_frame(int usig, struct ksignal *ksig,
__put_user_error(0, &frame->sig.uc.uc_flags, err);
__put_user_error(NULL, &frame->sig.uc.uc_link, err);
- err |= __save_altstack(&frame->sig.uc.uc_stack, regs->sp);
+ err |= __compat_save_altstack(&frame->sig.uc.uc_stack, regs->sp);
err |= setup_sigframe(&frame->sig, regs, set);
if (err == 0) {
setup_return(regs, &ksig->ka, frame,
--
1.8.4.5
From f6cde6e2a75a4b153758eea679c5a839fc1c39d2 Mon Sep 17 00:00:00 2001
From: "Zhang Jian(Bamvor)" <bamvor.zhangjian@huawei.com>
Date: Sat, 26 Mar 2016 18:10:38 +0800
Subject: [PATCH] Revert "[AARCH64] Add kernel_sigaction.h for AARCH64 ILP32"
This reverts commit 68e11d8643cfd08a62cea3555e92d77a21bf41de.
---
sysdeps/unix/sysv/linux/aarch64/kernel_sigaction.h | 12 ------------
sysdeps/unix/sysv/linux/aarch64/sigaction.c | 10 ++++------
2 files changed, 4 insertions(+), 18 deletions(-)
delete mode 100644 sysdeps/unix/sysv/linux/aarch64/kernel_sigaction.h
deleted file mode 100644
@@ -1,12 +0,0 @@
-
-#define HAVE_SA_RESTORER
-
-/* This is the sigaction structure in aarch64 kernel.
- Note the ILP32 struct uses the same struct as LP64
- which is why the fields are 64bit in size. */
-struct kernel_sigaction {
- unsigned long long k_sa_handler;
- unsigned long long sa_flags;
- unsigned long long sa_restorer;
- sigset_t sa_mask;
-};
@@ -39,17 +39,15 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
if (act)
{
- kact.k_sa_handler = (unsigned long long)(uintptr_t)act->sa_handler;
+ kact.k_sa_handler = act->sa_handler;
memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
kact.sa_flags = act->sa_flags;
#ifdef HAVE_SA_RESTORER
if (kact.sa_flags & SA_RESTORER)
- kact.sa_restorer = (unsigned long long)(uintptr_t)act->sa_restorer;
+ kact.sa_restorer = act->sa_restorer;
#endif
}
- /* This is needed for ILP32 as the structures are two different sizes due to
- using the LP64 structure. */
result = INLINE_SYSCALL (rt_sigaction, 4, sig,
act ? &kact : NULL,
oact ? &koact : NULL, _NSIG / 8);
@@ -57,11 +55,11 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
if (oact && result >= 0)
{
- oact->sa_handler = (void*)(uintptr_t)koact.k_sa_handler;
+ oact->sa_handler = koact.k_sa_handler;
memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
oact->sa_flags = koact.sa_flags;
#ifdef HAVE_SA_RESTORER
- oact->sa_restorer = (void*)(uintptr_t)koact.sa_restorer;
+ oact->sa_restorer = koact.sa_restorer;
#endif
}
}