Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2016 17:18:04 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293569 - in stable/10/sys: amd64/linux amd64/linux32 i386/linux
Message-ID:  <201601091718.u09HI4b5054858@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Jan  9 17:18:03 2016
New Revision: 293569
URL: https://svnweb.freebsd.org/changeset/base/293569

Log:
  MFC r283467:
  
  Call nosys in case when the incorrect syscall number is specified.
  
  Its my fault, fixed by mjg@ at r289055.

Modified:
  stable/10/sys/amd64/linux/linux_sysvec.c
  stable/10/sys/amd64/linux/syscalls.master
  stable/10/sys/amd64/linux32/linux32_sysvec.c
  stable/10/sys/amd64/linux32/syscalls.master
  stable/10/sys/i386/linux/linux_sysvec.c
  stable/10/sys/i386/linux/syscalls.master
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/amd64/linux/linux_sysvec.c
==============================================================================
--- stable/10/sys/amd64/linux/linux_sysvec.c	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/amd64/linux/linux_sysvec.c	Sat Jan  9 17:18:03 2016	(r293569)
@@ -254,10 +254,10 @@ linux_fetch_syscall_args(struct thread *
 	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;
 

Modified: stable/10/sys/amd64/linux/syscalls.master
==============================================================================
--- stable/10/sys/amd64/linux/syscalls.master	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/amd64/linux/syscalls.master	Sat Jan  9 17:18:03 2016	(r293569)
@@ -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

Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/10/sys/amd64/linux32/linux32_sysvec.c	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/amd64/linux32/linux32_sysvec.c	Sat Jan  9 17:18:03 2016	(r293569)
@@ -764,7 +764,8 @@ linux32_fetch_syscall_args(struct thread
 	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;

Modified: stable/10/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/10/sys/amd64/linux32/syscalls.master	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/amd64/linux32/syscalls.master	Sat Jan  9 17:18:03 2016	(r293569)
@@ -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

Modified: stable/10/sys/i386/linux/linux_sysvec.c
==============================================================================
--- stable/10/sys/i386/linux/linux_sysvec.c	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/i386/linux/linux_sysvec.c	Sat Jan  9 17:18:03 2016	(r293569)
@@ -890,7 +890,8 @@ linux_fetch_syscall_args(struct thread *
 	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;

Modified: stable/10/sys/i386/linux/syscalls.master
==============================================================================
--- stable/10/sys/i386/linux/syscalls.master	Sat Jan  9 17:15:03 2016	(r293568)
+++ stable/10/sys/i386/linux/syscalls.master	Sat Jan  9 17:18:03 2016	(r293569)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091718.u09HI4b5054858>