aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-25 19:31:29 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-14 09:17:54 -0500
commit51682036d006b175022d0cd010672d3fff041278 (patch)
tree7617fba3369c311b4a7eb3ba0cfbde99edfa78b8 /arch/arm64
parent02323a9d92a1acc0bbc40239a0a3a91bffa0dad3 (diff)
arm64: switch to generic old sigaction() (compat-only)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/arm64/kernel/signal32.c45
2 files changed, 1 insertions, 45 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 24dce472a77e..1f27c58f44ad 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -210,6 +210,7 @@ config COMPAT
210 select COMPAT_BINFMT_ELF 210 select COMPAT_BINFMT_ELF
211 select HAVE_UID16 211 select HAVE_UID16
212 select OLD_SIGSUSPEND3 212 select OLD_SIGSUSPEND3
213 select COMPAT_OLD_SIGACTION
213 help 214 help
214 This option enables support for a 32-bit EL0 running under a 64-bit 215 This option enables support for a 32-bit EL0 running under a 64-bit
215 kernel at EL1. AArch32-specific components such as system calls, 216 kernel at EL1. AArch32-specific components such as system calls,
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index 892b9dfb5517..92ada01f4cd8 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -28,13 +28,6 @@
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/unistd32.h> 29#include <asm/unistd32.h>
30 30
31struct compat_old_sigaction {
32 compat_uptr_t sa_handler;
33 compat_old_sigset_t sa_mask;
34 compat_ulong_t sa_flags;
35 compat_uptr_t sa_restorer;
36};
37
38struct compat_sigcontext { 31struct compat_sigcontext {
39 /* We always set these two fields to 0 */ 32 /* We always set these two fields to 0 */
40 compat_ulong_t trap_no; 33 compat_ulong_t trap_no;
@@ -326,44 +319,6 @@ static int compat_restore_vfp_context(struct compat_vfp_sigframe __user *frame)
326 return err ? -EFAULT : 0; 319 return err ? -EFAULT : 0;
327} 320}
328 321
329asmlinkage int compat_sys_sigaction(int sig,
330 const struct compat_old_sigaction __user *act,
331 struct compat_old_sigaction __user *oact)
332{
333 struct k_sigaction new_ka, old_ka;
334 int ret;
335 compat_old_sigset_t mask;
336 compat_uptr_t handler, restorer;
337
338 if (act) {
339 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
340 __get_user(handler, &act->sa_handler) ||
341 __get_user(restorer, &act->sa_restorer) ||
342 __get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
343 __get_user(mask, &act->sa_mask))
344 return -EFAULT;
345
346 new_ka.sa.sa_handler = compat_ptr(handler);
347 new_ka.sa.sa_restorer = compat_ptr(restorer);
348 siginitset(&new_ka.sa.sa_mask, mask);
349 }
350
351 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
352
353 if (!ret && oact) {
354 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
355 __put_user(ptr_to_compat(old_ka.sa.sa_handler),
356 &oact->sa_handler) ||
357 __put_user(ptr_to_compat(old_ka.sa.sa_restorer),
358 &oact->sa_restorer) ||
359 __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
360 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
361 return -EFAULT;
362 }
363
364 return ret;
365}
366
367static int compat_restore_sigframe(struct pt_regs *regs, 322static int compat_restore_sigframe(struct pt_regs *regs,
368 struct compat_sigframe __user *sf) 323 struct compat_sigframe __user *sf)
369{ 324{