diff options
Diffstat (limited to 'arch/powerpc/kernel/syscalls.c')
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index 69d3c5d50a54..f2496f2faecc 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c | |||
@@ -116,63 +116,6 @@ long ppc64_personality(unsigned long personality) | |||
116 | } | 116 | } |
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | #ifdef CONFIG_PPC64 | ||
120 | #define OVERRIDE_MACHINE (personality(current->personality) == PER_LINUX32) | ||
121 | #else | ||
122 | #define OVERRIDE_MACHINE 0 | ||
123 | #endif | ||
124 | |||
125 | static inline int override_machine(char __user *mach) | ||
126 | { | ||
127 | if (OVERRIDE_MACHINE) { | ||
128 | /* change ppc64 to ppc */ | ||
129 | if (__put_user(0, mach+3) || __put_user(0, mach+4)) | ||
130 | return -EFAULT; | ||
131 | } | ||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | int sys_uname(struct old_utsname __user *name) | ||
136 | { | ||
137 | int err = 0; | ||
138 | |||
139 | down_read(&uts_sem); | ||
140 | if (copy_to_user(name, utsname(), sizeof(*name))) | ||
141 | err = -EFAULT; | ||
142 | up_read(&uts_sem); | ||
143 | if (!err) | ||
144 | err = override_machine(name->machine); | ||
145 | return err; | ||
146 | } | ||
147 | |||
148 | int sys_olduname(struct oldold_utsname __user *name) | ||
149 | { | ||
150 | int error; | ||
151 | |||
152 | if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname))) | ||
153 | return -EFAULT; | ||
154 | |||
155 | down_read(&uts_sem); | ||
156 | error = __copy_to_user(&name->sysname, &utsname()->sysname, | ||
157 | __OLD_UTS_LEN); | ||
158 | error |= __put_user(0, name->sysname + __OLD_UTS_LEN); | ||
159 | error |= __copy_to_user(&name->nodename, &utsname()->nodename, | ||
160 | __OLD_UTS_LEN); | ||
161 | error |= __put_user(0, name->nodename + __OLD_UTS_LEN); | ||
162 | error |= __copy_to_user(&name->release, &utsname()->release, | ||
163 | __OLD_UTS_LEN); | ||
164 | error |= __put_user(0, name->release + __OLD_UTS_LEN); | ||
165 | error |= __copy_to_user(&name->version, &utsname()->version, | ||
166 | __OLD_UTS_LEN); | ||
167 | error |= __put_user(0, name->version + __OLD_UTS_LEN); | ||
168 | error |= __copy_to_user(&name->machine, &utsname()->machine, | ||
169 | __OLD_UTS_LEN); | ||
170 | error |= override_machine(name->machine); | ||
171 | up_read(&uts_sem); | ||
172 | |||
173 | return error? -EFAULT: 0; | ||
174 | } | ||
175 | |||
176 | long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, | 119 | long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, |
177 | u32 len_high, u32 len_low) | 120 | u32 len_high, u32 len_low) |
178 | { | 121 | { |