aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32/sys_ia32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/ia32/sys_ia32.c')
-rw-r--r--arch/x86_64/ia32/sys_ia32.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 2b2d029f477c..f182b20858e2 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -30,7 +30,6 @@
30#include <linux/resource.h> 30#include <linux/resource.h>
31#include <linux/times.h> 31#include <linux/times.h>
32#include <linux/utsname.h> 32#include <linux/utsname.h>
33#include <linux/timex.h>
34#include <linux/smp.h> 33#include <linux/smp.h>
35#include <linux/smp_lock.h> 34#include <linux/smp_lock.h>
36#include <linux/sem.h> 35#include <linux/sem.h>
@@ -767,82 +766,6 @@ sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, s32 count)
767 return ret; 766 return ret;
768} 767}
769 768
770/* Handle adjtimex compatibility. */
771
772struct timex32 {
773 u32 modes;
774 s32 offset, freq, maxerror, esterror;
775 s32 status, constant, precision, tolerance;
776 struct compat_timeval time;
777 s32 tick;
778 s32 ppsfreq, jitter, shift, stabil;
779 s32 jitcnt, calcnt, errcnt, stbcnt;
780 s32 :32; s32 :32; s32 :32; s32 :32;
781 s32 :32; s32 :32; s32 :32; s32 :32;
782 s32 :32; s32 :32; s32 :32; s32 :32;
783};
784
785extern int do_adjtimex(struct timex *);
786
787asmlinkage long
788sys32_adjtimex(struct timex32 __user *utp)
789{
790 struct timex txc;
791 int ret;
792
793 memset(&txc, 0, sizeof(struct timex));
794
795 if (!access_ok(VERIFY_READ, utp, sizeof(struct timex32)) ||
796 __get_user(txc.modes, &utp->modes) ||
797 __get_user(txc.offset, &utp->offset) ||
798 __get_user(txc.freq, &utp->freq) ||
799 __get_user(txc.maxerror, &utp->maxerror) ||
800 __get_user(txc.esterror, &utp->esterror) ||
801 __get_user(txc.status, &utp->status) ||
802 __get_user(txc.constant, &utp->constant) ||
803 __get_user(txc.precision, &utp->precision) ||
804 __get_user(txc.tolerance, &utp->tolerance) ||
805 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
806 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
807 __get_user(txc.tick, &utp->tick) ||
808 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
809 __get_user(txc.jitter, &utp->jitter) ||
810 __get_user(txc.shift, &utp->shift) ||
811 __get_user(txc.stabil, &utp->stabil) ||
812 __get_user(txc.jitcnt, &utp->jitcnt) ||
813 __get_user(txc.calcnt, &utp->calcnt) ||
814 __get_user(txc.errcnt, &utp->errcnt) ||
815 __get_user(txc.stbcnt, &utp->stbcnt))
816 return -EFAULT;
817
818 ret = do_adjtimex(&txc);
819
820 if (!access_ok(VERIFY_WRITE, utp, sizeof(struct timex32)) ||
821 __put_user(txc.modes, &utp->modes) ||
822 __put_user(txc.offset, &utp->offset) ||
823 __put_user(txc.freq, &utp->freq) ||
824 __put_user(txc.maxerror, &utp->maxerror) ||
825 __put_user(txc.esterror, &utp->esterror) ||
826 __put_user(txc.status, &utp->status) ||
827 __put_user(txc.constant, &utp->constant) ||
828 __put_user(txc.precision, &utp->precision) ||
829 __put_user(txc.tolerance, &utp->tolerance) ||
830 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
831 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
832 __put_user(txc.tick, &utp->tick) ||
833 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
834 __put_user(txc.jitter, &utp->jitter) ||
835 __put_user(txc.shift, &utp->shift) ||
836 __put_user(txc.stabil, &utp->stabil) ||
837 __put_user(txc.jitcnt, &utp->jitcnt) ||
838 __put_user(txc.calcnt, &utp->calcnt) ||
839 __put_user(txc.errcnt, &utp->errcnt) ||
840 __put_user(txc.stbcnt, &utp->stbcnt))
841 ret = -EFAULT;
842
843 return ret;
844}
845
846asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len, 769asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len,
847 unsigned long prot, unsigned long flags, 770 unsigned long prot, unsigned long flags,
848 unsigned long fd, unsigned long pgoff) 771 unsigned long fd, unsigned long pgoff)