aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig3
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/tile/include/asm/compat.h11
-rw-r--r--arch/tile/kernel/compat.c43
-rw-r--r--arch/x86/Kconfig1
8 files changed, 8 insertions, 54 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index a6f14f622d13..684eb5af439d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -213,4 +213,7 @@ config HAVE_CMPXCHG_LOCAL
213config HAVE_CMPXCHG_DOUBLE 213config HAVE_CMPXCHG_DOUBLE
214 bool 214 bool
215 215
216config ARCH_WANT_OLD_COMPAT_IPC
217 bool
218
216source "kernel/gcov/Kconfig" 219source "kernel/gcov/Kconfig"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index edbbae17e820..ce30e2f91d77 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2457,6 +2457,7 @@ config MIPS32_COMPAT
2457config COMPAT 2457config COMPAT
2458 bool 2458 bool
2459 depends on MIPS32_COMPAT 2459 depends on MIPS32_COMPAT
2460 select ARCH_WANT_OLD_COMPAT_IPC
2460 default y 2461 default y
2461 2462
2462config SYSVIPC_COMPAT 2463config SYSVIPC_COMPAT
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d219ebecabf0..eeaa5328b862 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -154,6 +154,7 @@ config COMPAT
154 bool 154 bool
155 default y if PPC64 155 default y if PPC64
156 select COMPAT_BINFMT_ELF 156 select COMPAT_BINFMT_ELF
157 select ARCH_WANT_OLD_COMPAT_IPC
157 158
158config SYSVIPC_COMPAT 159config SYSVIPC_COMPAT
159 bool 160 bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 465d5be1f0f4..2b7c0fbe578e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -219,6 +219,7 @@ config COMPAT
219 prompt "Kernel support for 31 bit emulation" 219 prompt "Kernel support for 31 bit emulation"
220 depends on 64BIT 220 depends on 64BIT
221 select COMPAT_BINFMT_ELF 221 select COMPAT_BINFMT_ELF
222 select ARCH_WANT_OLD_COMPAT_IPC
222 help 223 help
223 Select this option if you want to enable your system kernel to 224 Select this option if you want to enable your system kernel to
224 handle system-calls from ELF binaries for 31 bit ESA. This option 225 handle system-calls from ELF binaries for 31 bit ESA. This option
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 1666de84d477..6c0683d3fcba 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -577,6 +577,7 @@ config COMPAT
577 depends on SPARC64 577 depends on SPARC64
578 default y 578 default y
579 select COMPAT_BINFMT_ELF 579 select COMPAT_BINFMT_ELF
580 select ARCH_WANT_OLD_COMPAT_IPC
580 581
581config SYSVIPC_COMPAT 582config SYSVIPC_COMPAT
582 bool 583 bool
diff --git a/arch/tile/include/asm/compat.h b/arch/tile/include/asm/compat.h
index bf95f55b82b0..4b4b28969a65 100644
--- a/arch/tile/include/asm/compat.h
+++ b/arch/tile/include/asm/compat.h
@@ -242,17 +242,6 @@ long compat_sys_fallocate(int fd, int mode,
242long compat_sys_sched_rr_get_interval(compat_pid_t pid, 242long compat_sys_sched_rr_get_interval(compat_pid_t pid,
243 struct compat_timespec __user *interval); 243 struct compat_timespec __user *interval);
244 244
245/* Versions of compat functions that differ from generic Linux. */
246struct compat_msgbuf;
247long tile_compat_sys_msgsnd(int msqid,
248 struct compat_msgbuf __user *msgp,
249 size_t msgsz, int msgflg);
250long tile_compat_sys_msgrcv(int msqid,
251 struct compat_msgbuf __user *msgp,
252 size_t msgsz, long msgtyp, int msgflg);
253long tile_compat_sys_ptrace(compat_long_t request, compat_long_t pid,
254 compat_long_t addr, compat_long_t data);
255
256/* Tilera Linux syscalls that don't have "compat" versions. */ 245/* Tilera Linux syscalls that don't have "compat" versions. */
257#define compat_sys_flush_cache sys_flush_cache 246#define compat_sys_flush_cache sys_flush_cache
258 247
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c
index bf5e9d70266c..d67459b9ac2a 100644
--- a/arch/tile/kernel/compat.c
+++ b/arch/tile/kernel/compat.c
@@ -16,7 +16,6 @@
16#define __SYSCALL_COMPAT 16#define __SYSCALL_COMPAT
17 17
18#include <linux/compat.h> 18#include <linux/compat.h>
19#include <linux/msg.h>
20#include <linux/syscalls.h> 19#include <linux/syscalls.h>
21#include <linux/kdev_t.h> 20#include <linux/kdev_t.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
@@ -95,52 +94,10 @@ long compat_sys_sched_rr_get_interval(compat_pid_t pid,
95 return ret; 94 return ret;
96} 95}
97 96
98/*
99 * The usual compat_sys_msgsnd() and _msgrcv() seem to be assuming
100 * some different calling convention than our normal 32-bit tile code.
101 */
102
103/* Already defined in ipc/compat.c, but we need it here. */
104struct compat_msgbuf {
105 compat_long_t mtype;
106 char mtext[1];
107};
108
109long tile_compat_sys_msgsnd(int msqid,
110 struct compat_msgbuf __user *msgp,
111 size_t msgsz, int msgflg)
112{
113 compat_long_t mtype;
114
115 if (get_user(mtype, &msgp->mtype))
116 return -EFAULT;
117 return do_msgsnd(msqid, mtype, msgp->mtext, msgsz, msgflg);
118}
119
120long tile_compat_sys_msgrcv(int msqid,
121 struct compat_msgbuf __user *msgp,
122 size_t msgsz, long msgtyp, int msgflg)
123{
124 long err, mtype;
125
126 err = do_msgrcv(msqid, &mtype, msgp->mtext, msgsz, msgtyp, msgflg);
127 if (err < 0)
128 goto out;
129
130 if (put_user(mtype, &msgp->mtype))
131 err = -EFAULT;
132 out:
133 return err;
134}
135
136/* Provide the compat syscall number to call mapping. */ 97/* Provide the compat syscall number to call mapping. */
137#undef __SYSCALL 98#undef __SYSCALL
138#define __SYSCALL(nr, call) [nr] = (call), 99#define __SYSCALL(nr, call) [nr] = (call),
139 100
140/* The generic versions of these don't work for Tile. */
141#define compat_sys_msgrcv tile_compat_sys_msgrcv
142#define compat_sys_msgsnd tile_compat_sys_msgsnd
143
144/* See comments in sys.c */ 101/* See comments in sys.c */
145#define compat_sys_fadvise64_64 sys32_fadvise64_64 102#define compat_sys_fadvise64_64 sys32_fadvise64_64
146#define compat_sys_readahead sys32_readahead 103#define compat_sys_readahead sys32_readahead
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3ad653de7100..e3974694078b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2177,6 +2177,7 @@ config IA32_AOUT
2177config COMPAT 2177config COMPAT
2178 def_bool y 2178 def_bool y
2179 depends on IA32_EMULATION 2179 depends on IA32_EMULATION
2180 select ARCH_WANT_OLD_COMPAT_IPC
2180 2181
2181config COMPAT_FOR_U64_ALIGNMENT 2182config COMPAT_FOR_U64_ALIGNMENT
2182 def_bool COMPAT 2183 def_bool COMPAT