aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/ia32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/ia32')
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c2
-rw-r--r--arch/ia64/ia32/ia32_entry.S8
-rw-r--r--arch/ia64/ia32/ia32priv.h4
-rw-r--r--arch/ia64/ia32/sys_ia32.c114
4 files changed, 7 insertions, 121 deletions
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index 4f0c30c38e99..f92bdaac8976 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -41,7 +41,7 @@ randomize_stack_top(unsigned long stack_top);
41#define elf_map elf32_map 41#define elf_map elf32_map
42 42
43#undef SET_PERSONALITY 43#undef SET_PERSONALITY
44#define SET_PERSONALITY(ex, ibcs2) elf32_set_personality() 44#define SET_PERSONALITY(ex) elf32_set_personality()
45 45
46#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) 46#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
47 47
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index a73ec0089d43..a8cf19958850 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -207,7 +207,7 @@ ia32_syscall_table:
207 data8 compat_sys_ptrace 207 data8 compat_sys_ptrace
208 data8 sys32_alarm 208 data8 sys32_alarm
209 data8 sys_ni_syscall 209 data8 sys_ni_syscall
210 data8 sys32_pause 210 data8 sys_pause
211 data8 compat_sys_utime /* 30 */ 211 data8 compat_sys_utime /* 30 */
212 data8 sys_ni_syscall /* old stty syscall holder */ 212 data8 sys_ni_syscall /* old stty syscall holder */
213 data8 sys_ni_syscall /* old gtty syscall holder */ 213 data8 sys_ni_syscall /* old gtty syscall holder */
@@ -220,7 +220,7 @@ ia32_syscall_table:
220 data8 sys_mkdir 220 data8 sys_mkdir
221 data8 sys_rmdir /* 40 */ 221 data8 sys_rmdir /* 40 */
222 data8 sys_dup 222 data8 sys_dup
223 data8 sys32_pipe 223 data8 sys_pipe
224 data8 compat_sys_times 224 data8 compat_sys_times
225 data8 sys_ni_syscall /* old prof syscall holder */ 225 data8 sys_ni_syscall /* old prof syscall holder */
226 data8 sys32_brk /* 45 */ 226 data8 sys32_brk /* 45 */
@@ -256,8 +256,8 @@ ia32_syscall_table:
256 data8 compat_sys_setrlimit /* 75 */ 256 data8 compat_sys_setrlimit /* 75 */
257 data8 compat_sys_old_getrlimit 257 data8 compat_sys_old_getrlimit
258 data8 compat_sys_getrusage 258 data8 compat_sys_getrusage
259 data8 sys32_gettimeofday 259 data8 compat_sys_gettimeofday
260 data8 sys32_settimeofday 260 data8 compat_sys_settimeofday
261 data8 sys32_getgroups16 /* 80 */ 261 data8 sys32_getgroups16 /* 80 */
262 data8 sys32_setgroups16 262 data8 sys32_setgroups16
263 data8 sys32_old_select 263 data8 sys32_old_select
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
index dd0c53687a96..0f15349c3c6b 100644
--- a/arch/ia64/ia32/ia32priv.h
+++ b/arch/ia64/ia32/ia32priv.h
@@ -332,8 +332,8 @@ void ia64_elf32_init(struct pt_regs *regs);
332#define ELF_PLATFORM NULL 332#define ELF_PLATFORM NULL
333 333
334#ifdef __KERNEL__ 334#ifdef __KERNEL__
335# define SET_PERSONALITY(EX,IBCS2) \ 335# define SET_PERSONALITY(EX) \
336 (current->personality = (IBCS2) ? PER_SVR4 : PER_LINUX) 336 (current->personality = PER_LINUX)
337#endif 337#endif
338 338
339#define IA32_EFLAG 0x200 339#define IA32_EFLAG 0x200
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 5df5e4c90e4d..5e92ae00bdbb 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -118,41 +118,6 @@ sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __use
118 return error; 118 return error;
119} 119}
120 120
121int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)
122{
123 compat_ino_t ino;
124 int err;
125
126 if ((u64) stat->size > MAX_NON_LFS ||
127 !old_valid_dev(stat->dev) ||
128 !old_valid_dev(stat->rdev))
129 return -EOVERFLOW;
130
131 ino = stat->ino;
132 if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino)
133 return -EOVERFLOW;
134
135 if (clear_user(ubuf, sizeof(*ubuf)))
136 return -EFAULT;
137
138 err = __put_user(old_encode_dev(stat->dev), &ubuf->st_dev);
139 err |= __put_user(ino, &ubuf->st_ino);
140 err |= __put_user(stat->mode, &ubuf->st_mode);
141 err |= __put_user(stat->nlink, &ubuf->st_nlink);
142 err |= __put_user(high2lowuid(stat->uid), &ubuf->st_uid);
143 err |= __put_user(high2lowgid(stat->gid), &ubuf->st_gid);
144 err |= __put_user(old_encode_dev(stat->rdev), &ubuf->st_rdev);
145 err |= __put_user(stat->size, &ubuf->st_size);
146 err |= __put_user(stat->atime.tv_sec, &ubuf->st_atime);
147 err |= __put_user(stat->atime.tv_nsec, &ubuf->st_atime_nsec);
148 err |= __put_user(stat->mtime.tv_sec, &ubuf->st_mtime);
149 err |= __put_user(stat->mtime.tv_nsec, &ubuf->st_mtime_nsec);
150 err |= __put_user(stat->ctime.tv_sec, &ubuf->st_ctime);
151 err |= __put_user(stat->ctime.tv_nsec, &ubuf->st_ctime_nsec);
152 err |= __put_user(stat->blksize, &ubuf->st_blksize);
153 err |= __put_user(stat->blocks, &ubuf->st_blocks);
154 return err;
155}
156 121
157#if PAGE_SHIFT > IA32_PAGE_SHIFT 122#if PAGE_SHIFT > IA32_PAGE_SHIFT
158 123
@@ -1133,83 +1098,12 @@ sys32_mremap (unsigned int addr, unsigned int old_len, unsigned int new_len,
1133 return ret; 1098 return ret;
1134} 1099}
1135 1100
1136asmlinkage long
1137sys32_pipe (int __user *fd)
1138{
1139 int retval;
1140 int fds[2];
1141
1142 retval = do_pipe_flags(fds, 0);
1143 if (retval)
1144 goto out;
1145 if (copy_to_user(fd, fds, sizeof(fds)))
1146 retval = -EFAULT;
1147 out:
1148 return retval;
1149}
1150
1151static inline long
1152get_tv32 (struct timeval *o, struct compat_timeval __user *i)
1153{
1154 return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
1155 (__get_user(o->tv_sec, &i->tv_sec) | __get_user(o->tv_usec, &i->tv_usec)));
1156}
1157
1158static inline long
1159put_tv32 (struct compat_timeval __user *o, struct timeval *i)
1160{
1161 return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
1162 (__put_user(i->tv_sec, &o->tv_sec) | __put_user(i->tv_usec, &o->tv_usec)));
1163}
1164
1165asmlinkage unsigned long 1101asmlinkage unsigned long
1166sys32_alarm (unsigned int seconds) 1102sys32_alarm (unsigned int seconds)
1167{ 1103{
1168 return alarm_setitimer(seconds); 1104 return alarm_setitimer(seconds);
1169} 1105}
1170 1106
1171/* Translations due to time_t size differences. Which affects all
1172 sorts of things, like timeval and itimerval. */
1173
1174extern struct timezone sys_tz;
1175
1176asmlinkage long
1177sys32_gettimeofday (struct compat_timeval __user *tv, struct timezone __user *tz)
1178{
1179 if (tv) {
1180 struct timeval ktv;
1181 do_gettimeofday(&ktv);
1182 if (put_tv32(tv, &ktv))
1183 return -EFAULT;
1184 }
1185 if (tz) {
1186 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
1187 return -EFAULT;
1188 }
1189 return 0;
1190}
1191
1192asmlinkage long
1193sys32_settimeofday (struct compat_timeval __user *tv, struct timezone __user *tz)
1194{
1195 struct timeval ktv;
1196 struct timespec kts;
1197 struct timezone ktz;
1198
1199 if (tv) {
1200 if (get_tv32(&ktv, tv))
1201 return -EFAULT;
1202 kts.tv_sec = ktv.tv_sec;
1203 kts.tv_nsec = ktv.tv_usec * 1000;
1204 }
1205 if (tz) {
1206 if (copy_from_user(&ktz, tz, sizeof(ktz)))
1207 return -EFAULT;
1208 }
1209
1210 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
1211}
1212
1213struct sel_arg_struct { 1107struct sel_arg_struct {
1214 unsigned int n; 1108 unsigned int n;
1215 unsigned int inp; 1109 unsigned int inp;
@@ -1724,14 +1618,6 @@ out:
1724} 1618}
1725 1619
1726asmlinkage int 1620asmlinkage int
1727sys32_pause (void)
1728{
1729 current->state = TASK_INTERRUPTIBLE;
1730 schedule();
1731 return -ERESTARTNOHAND;
1732}
1733
1734asmlinkage int
1735sys32_msync (unsigned int start, unsigned int len, int flags) 1621sys32_msync (unsigned int start, unsigned int len, int flags)
1736{ 1622{
1737 unsigned int addr; 1623 unsigned int addr;