]> git.hungrycats.org Git - linux/commitdiff
[PATCH] make Alpha use generic copy_siginfo_to_user
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 15 Jul 2002 05:58:05 +0000 (22:58 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 15 Jul 2002 05:58:05 +0000 (22:58 -0700)
  Having looked closer than before, it seems that Alpha can
  use the generic copy_siginfo_to_user function.

arch/alpha/kernel/signal.c
include/asm-alpha/siginfo.h

index 565d4af63843189254cbd55c8b10e29d4677f011..839dffd2e0777085d009d5e0de88fd6de196c11d 100644 (file)
@@ -36,36 +36,6 @@ static int do_signal(sigset_t *, struct pt_regs *, struct switch_stack *,
                     unsigned long, unsigned long);
 
 
-int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
-{
-       if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
-               return -EFAULT;
-       if (from->si_code < 0)
-               return __copy_to_user(to, from, sizeof(siginfo_t));
-       else {
-               int err;
-
-               /* If you change siginfo_t structure, please be sure
-                  this code is fixed accordingly.
-                  It should never copy any pad contained in the structure
-                  to avoid security leaks, but must copy the generic
-                  3 ints plus the relevant union member.  */
-               err = __put_user(*(long *)&from->si_signo, (long *)&to->si_signo);
-               err |= __put_user((short)from->si_code, &to->si_code);
-               switch (from->si_code >> 16) {
-               case __SI_CHLD >> 16:
-                       err |= __put_user(from->si_utime, &to->si_utime);
-                       err |= __put_user(from->si_stime, &to->si_stime);
-                       err |= __put_user(from->si_status, &to->si_status);
-               default:
-                       err |= __put_user(from->si_addr, &to->si_addr);
-                       break;
-               /* case __SI_RT: This is not generated by the kernel as of now.  */
-               }
-               return err;
-       }
-}
-
 /*
  * The OSF/1 sigprocmask calling sequence is different from the
  * C sigprocmask() sequence..
index 42eb85ee57600a885f8b3d592a24fa71ab2acabc..7f54a8019e103c7a0cc55f4d9d823c921137bed9 100644 (file)
@@ -6,7 +6,6 @@
 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
 
 #define HAVE_ARCH_COPY_SIGINFO
-#define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>