linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus <torvalds@transmeta.com>
Cc: Trivial Kernel Patches <trivial@rustcorp.com.au>,
	LKML <linux-kernel@vger.kernel.org>,
	Roman Zippel <zippel@linux-m68k.org>
Subject: [PATCH] missing bit from signal patches - take 2 (or 3)
Date: Fri, 31 May 2002 10:53:43 +1000	[thread overview]
Message-ID: <20020531105343.055ad372.sfr@canb.auug.org.au> (raw)

Hi Linus,

The following should allow the affected architectures to build in
2.5.19 as currently there will be two definitions of
copy_siginfo_to_user and if an architecture defines its own
siginfo_t it MUST define copy_siginfo().

Please apply.  This one should have a better chance of working :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.19/include/asm-alpha/siginfo.h 2.5.19-si.4/include/asm-alpha/siginfo.h
--- 2.5.19/include/asm-alpha/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-alpha/siginfo.h	Thu May 30 23:11:50 2002
@@ -6,6 +6,7 @@
 #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>
 
diff -ruN 2.5.19/include/asm-cris/siginfo.h 2.5.19-si.4/include/asm-cris/siginfo.h
--- 2.5.19/include/asm-cris/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-cris/siginfo.h	Thu May 30 23:11:50 2002
@@ -1,6 +1,8 @@
 #ifndef _CRIS_SIGINFO_H
 #define _CRIS_SIGINFO_H
 
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
+
 #include <asm-generic/siginfo.h>
 
 #endif
diff -ruN 2.5.19/include/asm-ia64/siginfo.h 2.5.19-si.4/include/asm-ia64/siginfo.h
--- 2.5.19/include/asm-ia64/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-ia64/siginfo.h	Fri May 31 10:27:41 2002
@@ -11,8 +11,8 @@
 #define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 4)
 
 #define HAVE_ARCH_SIGINFO_T
-
 #define HAVE_ARCH_COPY_SIGINFO
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
 
diff -ruN 2.5.19/include/asm-m68k/siginfo.h 2.5.19-si.4/include/asm-m68k/siginfo.h
--- 2.5.19/include/asm-m68k/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-m68k/siginfo.h	Fri May 31 10:28:37 2002
@@ -2,6 +2,7 @@
 #define _M68K_SIGINFO_H
 
 #define HAVE_ARCH_SIGINFO_T
+#define HAVE_ARCH_COPY_SIGINFO
 
 #include <asm-generic/siginfo.h>
 
@@ -68,6 +69,21 @@
 #define si_uid16	_sifields._kill._uid
 #else
 #define si_uid		_sifields._kill._uid
+#endif
+
+#ifdef __KERNEL__
+
+#include <linux/string.h>
+
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
+{
+	if (from->si_code < 0)
+		memcpy(to, from, sizeof(*to));
+	else
+		/* _sigchld is currently the largest know union member */
+		memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
+}
+
 #endif /* __KERNEL__ */
 
 #endif
diff -ruN 2.5.19/include/asm-mips/siginfo.h 2.5.19-si.4/include/asm-mips/siginfo.h
--- 2.5.19/include/asm-mips/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-mips/siginfo.h	Thu May 30 23:18:46 2002
@@ -12,8 +12,8 @@
 #define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 4)
 
 #define HAVE_ARCH_SIGINFO_T
-
 #define HAVE_ARCH_SIGEVENT_T
+#define HAVE_ARCH_COPY_SIGINFO
 
 #include <asm-generic/siginfo.h>
 
@@ -121,5 +121,20 @@
 		} _sigev_thread;
 	} _sigev_un;
 } sigevent_t;
+
+#ifdef __KERNEL__
+
+#include <linux/string.h>
+
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
+{
+	if (from->si_code < 0)
+		memcpy(to, from, sizeof(*to));
+	else
+		/* _sigchld is currently the largest know union member */
+		memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
+}
+
+#endif
 
 #endif /* _ASM_SIGINFO_H */
diff -ruN 2.5.19/include/asm-mips64/siginfo.h 2.5.19-si.4/include/asm-mips64/siginfo.h
--- 2.5.19/include/asm-mips64/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-mips64/siginfo.h	Thu May 30 23:19:33 2002
@@ -13,6 +13,8 @@
 
 #define HAVE_ARCH_SIGINFO_T
 #define HAVE_ARCH_SIGEVENT_T
+#define HAVE_ARCH_COPY_SIGINFO
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
 
@@ -120,5 +122,20 @@
 		} _sigev_thread;
 	} _sigev_un;
 } sigevent_t;
+
+#ifdef __KERNEL__
+
+#include <linux/string.h>
+
+static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
+{
+	if (from->si_code < 0)
+		memcpy(to, from, sizeof(*to));
+	else
+		/* _sigchld is currently the largest know union member */
+		memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
+}
+
+#endif
 
 #endif /* _ASM_SIGINFO_H */
diff -ruN 2.5.19/include/asm-parisc/siginfo.h 2.5.19-si.4/include/asm-parisc/siginfo.h
--- 2.5.19/include/asm-parisc/siginfo.h	Thu May 30 09:44:38 2002
+++ 2.5.19-si.4/include/asm-parisc/siginfo.h	Thu May 30 23:11:50 2002
@@ -1,6 +1,8 @@
 #ifndef _PARISC_SIGINFO_H
 #define _PARISC_SIGINFO_H
 
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
+
 #include <asm-generic/siginfo.h>
 
 /*
diff -ruN 2.5.19/include/asm-sparc/siginfo.h 2.5.19-si.4/include/asm-sparc/siginfo.h
--- 2.5.19/include/asm-sparc/siginfo.h	Thu May 30 09:44:39 2002
+++ 2.5.19-si.4/include/asm-sparc/siginfo.h	Thu May 30 23:11:50 2002
@@ -7,6 +7,7 @@
 
 #define HAVE_ARCH_SIGINFO_T
 #define HAVE_ARCH_COPY_SIGINFO
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
 
diff -ruN 2.5.19/include/asm-sparc64/siginfo.h 2.5.19-si.4/include/asm-sparc64/siginfo.h
--- 2.5.19/include/asm-sparc64/siginfo.h	Thu May 30 09:44:39 2002
+++ 2.5.19-si.4/include/asm-sparc64/siginfo.h	Fri May 31 10:30:00 2002
@@ -8,8 +8,8 @@
 #define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
 
 #define HAVE_ARCH_SIGINFO_T
-
 #define HAVE_ARCH_COPY_SIGINFO
+#define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
 

                 reply	other threads:[~2002-05-31  0:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020531105343.055ad372.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=trivial@rustcorp.com.au \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).