Call nosys in case when the incorrect syscall number is specified.
Reported by: trinity
This commit is contained in:
parent
df01339e31
commit
92d496261e
@ -254,10 +254,10 @@ linux_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
sa->args[5] = frame->tf_r9;
|
||||
sa->code = frame->tf_rax;
|
||||
|
||||
if (sa->code >= p->p_sysent->sv_size) {
|
||||
PROC_LOCK(p);
|
||||
sigexit(td, SIGILL);
|
||||
} else
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
/* nosys */
|
||||
sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
|
||||
|
@ -506,3 +506,5 @@
|
||||
310 AUE_NULL STD { int linux_process_vm_writev(void); }
|
||||
311 AUE_NULL STD { int linux_kcmp(void); }
|
||||
312 AUE_NULL STD { int linux_finit_module(void); }
|
||||
; please, keep this line at the end.
|
||||
313 AUE_NULL UNIMPL nosys
|
||||
|
@ -764,7 +764,8 @@ linux32_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
sa->code = frame->tf_rax;
|
||||
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
sa->callp = &p->p_sysent->sv_table[0];
|
||||
/* nosys */
|
||||
sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
|
@ -575,3 +575,5 @@
|
||||
346 AUE_NULL STD { int linux_setns(void); }
|
||||
347 AUE_NULL STD { int linux_process_vm_readv(void); }
|
||||
348 AUE_NULL STD { int linux_process_vm_writev(void); }
|
||||
; please, keep this line at the end.
|
||||
349 AUE_NULL UNIMPL nosys
|
||||
|
@ -890,7 +890,8 @@ linux_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
sa->args[5] = frame->tf_ebp; /* Unconfirmed */
|
||||
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
sa->callp = &p->p_sysent->sv_table[0];
|
||||
/* nosys */
|
||||
sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
|
@ -583,3 +583,5 @@
|
||||
346 AUE_NULL STD { int linux_setns(void); }
|
||||
347 AUE_NULL STD { int linux_process_vm_readv(void); }
|
||||
348 AUE_NULL STD { int linux_process_vm_writev(void); }
|
||||
; please, keep this line at the end.
|
||||
349 AUE_NULL UNIMPL nosys
|
||||
|
Loading…
Reference in New Issue
Block a user