summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZou Nanhai <nanhai.zou@intel.com>2005-01-04 05:36:02 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-04 05:36:02 -0800
commit4b36077f9cbc7bd58dc616a778b3290f1ea43c98 (patch)
treef99f85157f3cbdb9925729429a5aba37bcc533da /include
parenteffe830dd3b5af86b8b76dd298ba1d5d8b08f530 (diff)
[PATCH] compat: sigtimedwait
- Merge sys32_rt_sigtimedwait function in X86_64, IA64, PPC64, MIPS, SPARC64, S390 32 bit layer into 1 compat_rt_sigtimedwait function. It will also fix a bug of copy wrong information to 32 bit userspace siginfo structure on X86_64, IA64 and SPARC64 when calling sigtimedwait on 32 bit layer. - Change all name the of siginfo_t32 structure in X86_64, IA64, MIPS, SPARC64 and S390 to the name compat_siginfo_t as used in PPC64. - Patch introduced a macro __COMPAT_ENDIAN_SWAP__ in include/asm-mips/compat.h when MIPS kernel is compiled in little-endian mode. This macro is used to do byte swapping in function sigset_from_compat. - This patch is only tested on X86_64 and IA_64. Signed-off-by: Zou Nan hai <Nanhai.zou@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/compat.h3
-rw-r--r--include/asm-sparc64/siginfo.h5
-rw-r--r--include/asm-x86_64/ia32.h8
-rw-r--r--include/linux/compat.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h
index 38b2116c78d2..dce92079e7fc 100644
--- a/include/asm-mips/compat.h
+++ b/include/asm-mips/compat.h
@@ -137,5 +137,8 @@ static inline void *compat_alloc_user_space(long len)
return (void *) (regs->regs[29] - len);
}
+#if defined (__MIPSEL__)
+#define __COMPAT_ENDIAN_SWAP__ 1
+#endif
#endif /* _ASM_COMPAT_H */
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 94b272f5d1b3..49952c6a23eb 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -24,7 +24,7 @@ typedef union sigval32 {
u32 sival_ptr;
} sigval_t32;
-struct siginfo32;
+struct compat_siginfo;
#endif /* CONFIG_COMPAT */
@@ -56,9 +56,6 @@ typedef struct sigevent32 {
} _sigev_un;
} sigevent_t32;
-extern int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from);
-extern int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from);
-
#endif /* CONFIG_COMPAT */
#endif /* __KERNEL__ */
diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
index 73319a9a8ca5..c0a7717923ed 100644
--- a/include/asm-x86_64/ia32.h
+++ b/include/asm-x86_64/ia32.h
@@ -78,7 +78,7 @@ struct stat64 {
unsigned long long st_ino;
} __attribute__((packed));
-typedef struct siginfo32 {
+typedef struct compat_siginfo{
int si_signo;
int si_errno;
int si_code;
@@ -128,7 +128,7 @@ typedef struct siginfo32 {
int _fd;
} _sigpoll;
} _sifields;
-} siginfo_t32;
+} compat_siginfo_t;
struct sigframe32
{
@@ -145,7 +145,7 @@ struct rt_sigframe32
int sig;
u32 pinfo;
u32 puc;
- struct siginfo32 info;
+ compat_siginfo_t info;
struct ucontext_ia32 uc;
struct _fpstate_ia32 fpstate;
};
@@ -165,8 +165,6 @@ struct siginfo_t;
int do_get_thread_area(struct thread_struct *t, struct user_desc __user *info);
int do_set_thread_area(struct thread_struct *t, struct user_desc __user *info);
int ia32_child_tls(struct task_struct *p, struct pt_regs *childregs);
-int ia32_copy_siginfo_from_user(siginfo_t *to, siginfo_t32 __user *from);
-int ia32_copy_siginfo_to_user(siginfo_t32 __user *to, siginfo_t *from);
#endif
#endif /* !CONFIG_IA32_SUPPORT */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 56d5582abfe2..a62f5c960c75 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -143,6 +143,8 @@ long compat_get_bitmap(unsigned long *mask, compat_ulong_t __user *umask,
unsigned long bitmap_size);
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
unsigned long bitmap_size);
-
+struct compat_siginfo;
+int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
+int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */