aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index d00599bb24a1..bb1cfcfdbbbb 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -71,69 +71,6 @@ asmlinkage long compat_sys_sysfs(u32 option, u32 arg1, u32 arg2)
71 return sys_sysfs((int)option, arg1, arg2); 71 return sys_sysfs((int)option, arg1, arg2);
72} 72}
73 73
74static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i)
75{
76 long usec;
77
78 if (!access_ok(VERIFY_READ, i, sizeof(*i)))
79 return -EFAULT;
80 if (__get_user(o->tv_sec, &i->tv_sec))
81 return -EFAULT;
82 if (__get_user(usec, &i->tv_usec))
83 return -EFAULT;
84 o->tv_nsec = usec * 1000;
85 return 0;
86}
87
88static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
89{
90 return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
91 (__put_user(i->tv_sec, &o->tv_sec) |
92 __put_user(i->tv_usec, &o->tv_usec)));
93}
94
95
96
97
98/* Translations due to time_t size differences. Which affects all
99 sorts of things, like timeval and itimerval. */
100extern struct timezone sys_tz;
101
102asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
103{
104 if (tv) {
105 struct timeval ktv;
106 do_gettimeofday(&ktv);
107 if (put_tv32(tv, &ktv))
108 return -EFAULT;
109 }
110 if (tz) {
111 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
112 return -EFAULT;
113 }
114
115 return 0;
116}
117
118
119
120asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
121{
122 struct timespec kts;
123 struct timezone ktz;
124
125 if (tv) {
126 if (get_ts32(&kts, tv))
127 return -EFAULT;
128 }
129 if (tz) {
130 if (copy_from_user(&ktz, tz, sizeof(ktz)))
131 return -EFAULT;
132 }
133
134 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
135}
136
137#ifdef CONFIG_SYSVIPC 74#ifdef CONFIG_SYSVIPC
138long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, 75long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
139 u32 fifth) 76 u32 fifth)