23 #include <linux/kernel.h>
24 #include <linux/sched.h>
27 #include <linux/signal.h>
30 #include <linux/utsname.h>
32 #include <linux/uio.h>
33 #include <linux/poll.h>
34 #include <linux/personality.h>
35 #include <linux/stat.h>
39 #include <linux/ptrace.h>
41 #include <linux/sysctl.h>
42 #include <linux/slab.h>
44 #include <asm/types.h>
45 #include <asm/uaccess.h>
50 #define AA(__x) ((unsigned long)(__x))
57 return sys_truncate(filename, ((loff_t) offset_high << 32) | offset_low);
63 return sys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low);
105 ret = cp_stat64(statbuf, &stat);
110 struct stat64 __user *statbuf)
115 ret = cp_stat64(statbuf, &stat);
124 ret = cp_stat64(statbuf, &stat);
137 return cp_stat64(statbuf, &stat);
177 unsigned int sigsetsize)
181 compat_sigset_t set32;
184 if (sigsetsize !=
sizeof(compat_sigset_t))
195 sizeof(compat_sigset_t)))
197 new_ka.
sa.sa_handler = compat_ptr(handler);
198 new_ka.
sa.sa_restorer = compat_ptr(restorer);
205 case 4: new_ka.
sa.sa_mask.sig[3] = set32.sig[6]
206 | (((
long)set32.sig[7]) << 32);
207 case 3: new_ka.
sa.sa_mask.sig[2] = set32.sig[4]
208 | (((
long)set32.sig[5]) << 32);
209 case 2: new_ka.
sa.sa_mask.sig[1] = set32.sig[2]
210 | (((
long)set32.sig[3]) << 32);
211 case 1: new_ka.
sa.sa_mask.sig[0] = set32.sig[0]
212 | (((
long)set32.sig[1]) << 32);
225 set32.sig[7] = (old_ka.
sa.sa_mask.sig[3] >> 32);
226 set32.sig[6] = old_ka.
sa.sa_mask.sig[3];
228 set32.sig[5] = (old_ka.
sa.sa_mask.sig[2] >> 32);
229 set32.sig[4] = old_ka.
sa.sa_mask.sig[2];
231 set32.sig[3] = (old_ka.
sa.sa_mask.sig[1] >> 32);
232 set32.sig[2] = old_ka.
sa.sa_mask.sig[1];
234 set32.sig[1] = (old_ka.
sa.sa_mask.sig[0] >> 32);
235 set32.sig[0] = old_ka.
sa.sa_mask.sig[0];
239 &oact->sa_handler) ||
241 &oact->sa_restorer) ||
244 sizeof(compat_sigset_t)))
268 new_ka.
sa.sa_handler = compat_ptr(handler);
269 new_ka.
sa.sa_restorer = compat_ptr(restorer);
271 siginitset(&new_ka.
sa.sa_mask, mask);
279 &oact->sa_handler) ||
281 &oact->sa_restorer) ||
326 case 4: s32.sig[7] = (s.
sig[3] >> 32); s32.sig[6] = s.
sig[3];
327 case 3: s32.sig[5] = (s.
sig[2] >> 32); s32.sig[4] = s.
sig[2];
328 case 2: s32.sig[3] = (s.
sig[1] >> 32); s32.sig[2] = s.
sig[1];
329 case 1: s32.sig[1] = (s.
sig[0] >> 32); s32.sig[0] = s.
sig[0];
357 ((loff_t)
AA(poshi) << 32) |
AA(poslo));
364 ((loff_t)
AA(poshi) << 32) |
AA(poslo));
396 return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
417 (((
u64)offset_high)<<32) | offset_low,
418 (((
u64)len_high)<<32) | len_low,
425 static char lastcomm[
sizeof(me->
comm)];
427 if (
strncmp(lastcomm, me->
comm,
sizeof(lastcomm))) {
429 "%s: vm86 mode not supported on 64 bit kernel\n",
437 char __user *
buf,
size_t len)
449 unsigned n_low,
unsigned n_hi,
int flags)
452 ((
u64)off_hi << 32) | off_low,
453 ((
u64)n_hi << 32) | n_low, flags);
457 size_t len,
int advice)
464 unsigned offset_hi,
unsigned len_lo,
468 ((
u64)len_hi << 32) | len_lo);
476 ((
u64)mask_hi << 32) | mask_lo,