diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/linux32.c | 16 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace.c | 30 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/syscall.c | 130 |
5 files changed, 2 insertions, 178 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index bde79ef602e..a39d0597a37 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -249,22 +249,6 @@ SYSCALL_DEFINE5(n32_msgrcv, int, msqid, u32, msgp, size_t, msgsz, | |||
249 | } | 249 | } |
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | SYSCALL_DEFINE1(32_newuname, struct new_utsname __user *, name) | ||
253 | { | ||
254 | int ret = 0; | ||
255 | |||
256 | down_read(&uts_sem); | ||
257 | if (copy_to_user(name, utsname(), sizeof *name)) | ||
258 | ret = -EFAULT; | ||
259 | up_read(&uts_sem); | ||
260 | |||
261 | if (current->personality == PER_LINUX32 && !ret) | ||
262 | if (copy_to_user(name->machine, "mips\0\0\0", 8)) | ||
263 | ret = -EFAULT; | ||
264 | |||
265 | return ret; | ||
266 | } | ||
267 | |||
268 | SYSCALL_DEFINE1(32_personality, unsigned long, personality) | 252 | SYSCALL_DEFINE1(32_personality, unsigned long, personality) |
269 | { | 253 | { |
270 | int ret; | 254 | int ret; |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 054861ccb4d..c51b95ff864 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -493,36 +493,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
493 | ret = ptrace_setfpregs(child, (__u32 __user *) data); | 493 | ret = ptrace_setfpregs(child, (__u32 __user *) data); |
494 | break; | 494 | break; |
495 | 495 | ||
496 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | ||
497 | case PTRACE_CONT: { /* restart after signal. */ | ||
498 | ret = -EIO; | ||
499 | if (!valid_signal(data)) | ||
500 | break; | ||
501 | if (request == PTRACE_SYSCALL) { | ||
502 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
503 | } | ||
504 | else { | ||
505 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
506 | } | ||
507 | child->exit_code = data; | ||
508 | wake_up_process(child); | ||
509 | ret = 0; | ||
510 | break; | ||
511 | } | ||
512 | |||
513 | /* | ||
514 | * make the child exit. Best I can do is send it a sigkill. | ||
515 | * perhaps it should be put in the status that it wants to | ||
516 | * exit. | ||
517 | */ | ||
518 | case PTRACE_KILL: | ||
519 | ret = 0; | ||
520 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
521 | break; | ||
522 | child->exit_code = SIGKILL; | ||
523 | wake_up_process(child); | ||
524 | break; | ||
525 | |||
526 | case PTRACE_GET_THREAD_AREA: | 496 | case PTRACE_GET_THREAD_AREA: |
527 | ret = put_user(task_thread_info(child)->tp_value, | 497 | ret = put_user(task_thread_info(child)->tp_value, |
528 | (unsigned long __user *) data); | 498 | (unsigned long __user *) data); |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 66b5a48676d..44337ba0371 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -181,7 +181,7 @@ EXPORT(sysn32_call_table) | |||
181 | PTR sys_exit | 181 | PTR sys_exit |
182 | PTR compat_sys_wait4 | 182 | PTR compat_sys_wait4 |
183 | PTR sys_kill /* 6060 */ | 183 | PTR sys_kill /* 6060 */ |
184 | PTR sys_32_newuname | 184 | PTR sys_newuname |
185 | PTR sys_semget | 185 | PTR sys_semget |
186 | PTR sys_semop | 186 | PTR sys_semop |
187 | PTR sys_n32_semctl | 187 | PTR sys_n32_semctl |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 515f9eab2b2..813689ef238 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -325,7 +325,7 @@ sys_call_table: | |||
325 | PTR sys32_sigreturn | 325 | PTR sys32_sigreturn |
326 | PTR sys32_clone /* 4120 */ | 326 | PTR sys32_clone /* 4120 */ |
327 | PTR sys_setdomainname | 327 | PTR sys_setdomainname |
328 | PTR sys_32_newuname | 328 | PTR sys_newuname |
329 | PTR sys_ni_syscall /* sys_modify_ldt */ | 329 | PTR sys_ni_syscall /* sys_modify_ldt */ |
330 | PTR compat_sys_adjtimex | 330 | PTR compat_sys_adjtimex |
331 | PTR sys_mprotect /* 4125 */ | 331 | PTR sys_mprotect /* 4125 */ |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 3f7f466190b..e96b1c30c7a 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -215,48 +215,6 @@ out: | |||
215 | return error; | 215 | return error; |
216 | } | 216 | } |
217 | 217 | ||
218 | /* | ||
219 | * Compacrapability ... | ||
220 | */ | ||
221 | SYSCALL_DEFINE1(uname, struct old_utsname __user *, name) | ||
222 | { | ||
223 | if (name && !copy_to_user(name, utsname(), sizeof (*name))) | ||
224 | return 0; | ||
225 | return -EFAULT; | ||
226 | } | ||
227 | |||
228 | /* | ||
229 | * Compacrapability ... | ||
230 | */ | ||
231 | SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) | ||
232 | { | ||
233 | int error; | ||
234 | |||
235 | if (!name) | ||
236 | return -EFAULT; | ||
237 | if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname))) | ||
238 | return -EFAULT; | ||
239 | |||
240 | error = __copy_to_user(&name->sysname, &utsname()->sysname, | ||
241 | __OLD_UTS_LEN); | ||
242 | error -= __put_user(0, name->sysname + __OLD_UTS_LEN); | ||
243 | error -= __copy_to_user(&name->nodename, &utsname()->nodename, | ||
244 | __OLD_UTS_LEN); | ||
245 | error -= __put_user(0, name->nodename + __OLD_UTS_LEN); | ||
246 | error -= __copy_to_user(&name->release, &utsname()->release, | ||
247 | __OLD_UTS_LEN); | ||
248 | error -= __put_user(0, name->release + __OLD_UTS_LEN); | ||
249 | error -= __copy_to_user(&name->version, &utsname()->version, | ||
250 | __OLD_UTS_LEN); | ||
251 | error -= __put_user(0, name->version + __OLD_UTS_LEN); | ||
252 | error -= __copy_to_user(&name->machine, &utsname()->machine, | ||
253 | __OLD_UTS_LEN); | ||
254 | error = __put_user(0, name->machine + __OLD_UTS_LEN); | ||
255 | error = error ? -EFAULT : 0; | ||
256 | |||
257 | return error; | ||
258 | } | ||
259 | |||
260 | SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) | 218 | SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) |
261 | { | 219 | { |
262 | struct thread_info *ti = task_thread_info(current); | 220 | struct thread_info *ti = task_thread_info(current); |
@@ -407,94 +365,6 @@ _sys_sysmips(nabi_no_regargs struct pt_regs regs) | |||
407 | } | 365 | } |
408 | 366 | ||
409 | /* | 367 | /* |
410 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
411 | * | ||
412 | * This is really horribly ugly. | ||
413 | */ | ||
414 | SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, int, second, | ||
415 | unsigned long, third, void __user *, ptr, long, fifth) | ||
416 | { | ||
417 | int version, ret; | ||
418 | |||
419 | version = call >> 16; /* hack for backward compatibility */ | ||
420 | call &= 0xffff; | ||
421 | |||
422 | switch (call) { | ||
423 | case SEMOP: | ||
424 | return sys_semtimedop(first, (struct sembuf __user *)ptr, | ||
425 | second, NULL); | ||
426 | case SEMTIMEDOP: | ||
427 | return sys_semtimedop(first, (struct sembuf __user *)ptr, | ||
428 | second, | ||
429 | (const struct timespec __user *)fifth); | ||
430 | case SEMGET: | ||
431 | return sys_semget(first, second, third); | ||
432 | case SEMCTL: { | ||
433 | union semun fourth; | ||
434 | if (!ptr) | ||
435 | return -EINVAL; | ||
436 | if (get_user(fourth.__pad, (void __user *__user *) ptr)) | ||
437 | return -EFAULT; | ||
438 | return sys_semctl(first, second, third, fourth); | ||
439 | } | ||
440 | |||
441 | case MSGSND: | ||
442 | return sys_msgsnd(first, (struct msgbuf __user *) ptr, | ||
443 | second, third); | ||
444 | case MSGRCV: | ||
445 | switch (version) { | ||
446 | case 0: { | ||
447 | struct ipc_kludge tmp; | ||
448 | if (!ptr) | ||
449 | return -EINVAL; | ||
450 | |||
451 | if (copy_from_user(&tmp, | ||
452 | (struct ipc_kludge __user *) ptr, | ||
453 | sizeof(tmp))) | ||
454 | return -EFAULT; | ||
455 | return sys_msgrcv(first, tmp.msgp, second, | ||
456 | tmp.msgtyp, third); | ||
457 | } | ||
458 | default: | ||
459 | return sys_msgrcv(first, | ||
460 | (struct msgbuf __user *) ptr, | ||
461 | second, fifth, third); | ||
462 | } | ||
463 | case MSGGET: | ||
464 | return sys_msgget((key_t) first, second); | ||
465 | case MSGCTL: | ||
466 | return sys_msgctl(first, second, | ||
467 | (struct msqid_ds __user *) ptr); | ||
468 | |||
469 | case SHMAT: | ||
470 | switch (version) { | ||
471 | default: { | ||
472 | unsigned long raddr; | ||
473 | ret = do_shmat(first, (char __user *) ptr, second, | ||
474 | &raddr); | ||
475 | if (ret) | ||
476 | return ret; | ||
477 | return put_user(raddr, (unsigned long __user *) third); | ||
478 | } | ||
479 | case 1: /* iBCS2 emulator entry point */ | ||
480 | if (!segment_eq(get_fs(), get_ds())) | ||
481 | return -EINVAL; | ||
482 | return do_shmat(first, (char __user *) ptr, second, | ||
483 | (unsigned long *) third); | ||
484 | } | ||
485 | case SHMDT: | ||
486 | return sys_shmdt((char __user *)ptr); | ||
487 | case SHMGET: | ||
488 | return sys_shmget(first, second, third); | ||
489 | case SHMCTL: | ||
490 | return sys_shmctl(first, second, | ||
491 | (struct shmid_ds __user *) ptr); | ||
492 | default: | ||
493 | return -ENOSYS; | ||
494 | } | ||
495 | } | ||
496 | |||
497 | /* | ||
498 | * No implemented yet ... | 368 | * No implemented yet ... |
499 | */ | 369 | */ |
500 | SYSCALL_DEFINE3(cachectl, char *, addr, int, nbytes, int, op) | 370 | SYSCALL_DEFINE3(cachectl, char *, addr, int, nbytes, int, op) |