|
@@ -262,14 +262,11 @@ bad_alignment:
|
|
LEAF(sys_syscall)
|
|
LEAF(sys_syscall)
|
|
subu t0, a0, __NR_O32_Linux # check syscall number
|
|
subu t0, a0, __NR_O32_Linux # check syscall number
|
|
sltiu v0, t0, __NR_O32_Linux_syscalls + 1
|
|
sltiu v0, t0, __NR_O32_Linux_syscalls + 1
|
|
|
|
+ beqz t0, einval # do not recurse
|
|
sll t1, t0, 3
|
|
sll t1, t0, 3
|
|
beqz v0, einval
|
|
beqz v0, einval
|
|
-
|
|
|
|
lw t2, sys_call_table(t1) # syscall routine
|
|
lw t2, sys_call_table(t1) # syscall routine
|
|
|
|
|
|
- li v1, 4000 - __NR_O32_Linux # index of sys_syscall
|
|
|
|
- beq t0, v1, einval # do not recurse
|
|
|
|
-
|
|
|
|
/* Some syscalls like execve get their arguments from struct pt_regs
|
|
/* Some syscalls like execve get their arguments from struct pt_regs
|
|
and claim zero arguments in the syscall table. Thus we have to
|
|
and claim zero arguments in the syscall table. Thus we have to
|
|
assume the worst case and shuffle around all potential arguments.
|
|
assume the worst case and shuffle around all potential arguments.
|