Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2017 12:49:25 +0000 (UTC)
From:      Mahdi Mokhtari <mmokhi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r316701 - in stable/11/sys: amd64/linux amd64/linux32 compat/linux i386/linux
Message-ID:  <201704111249.v3BCnPhc034464@repo.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help
Author: mmokhi (ports committer)
Date: Tue Apr 11 12:49:25 2017
New Revision: 316701
URL: https://svnweb.freebsd.org/changeset/base/316701

Log:
  MFC r314782:
  
  Add UNIMPLEMENTED() placeholder macro for
  the syscalls that are not implemented in Linux kernel itself.
  Cleanup DUMMY() macros.
  
  Approved by:	trasz

Modified:
  stable/11/sys/amd64/linux/linux_dummy.c
  stable/11/sys/amd64/linux/syscalls.master
  stable/11/sys/amd64/linux32/linux32_dummy.c
  stable/11/sys/amd64/linux32/syscalls.master
  stable/11/sys/compat/linux/linux_util.h
  stable/11/sys/i386/linux/linux_dummy.c
  stable/11/sys/i386/linux/syscalls.master
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/linux/linux_dummy.c
==============================================================================
--- stable/11/sys/amd64/linux/linux_dummy.c	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/amd64/linux/linux_dummy.c	Tue Apr 11 12:49:25 2017	(r316701)
@@ -43,6 +43,22 @@ __FBSDID("$FreeBSD$");
 /* DTrace init */
 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
 
+UNIMPLEMENTED(afs_syscall);
+UNIMPLEMENTED(create_module);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(epoll_ctl_old);
+UNIMPLEMENTED(epoll_wait_old);
+UNIMPLEMENTED(get_kernel_syms);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(get_thread_area);
+UNIMPLEMENTED(getpmsg);
+UNIMPLEMENTED(nfsservctl);	/* added in linux 2.2 removed in 3.1 */
+UNIMPLEMENTED(putpmsg);
+UNIMPLEMENTED(query_module);	/* added in linux 2.2 removed in 2.6 */
+UNIMPLEMENTED(security);
+UNIMPLEMENTED(set_thread_area);
+UNIMPLEMENTED(tuxcall);
+UNIMPLEMENTED(uselib);
+UNIMPLEMENTED(vserver);
+
 DUMMY(mincore);
 DUMMY(sendfile);
 DUMMY(syslog);
@@ -53,22 +69,10 @@ DUMMY(vhangup);
 DUMMY(pivot_root);
 DUMMY(adjtimex);
 DUMMY(swapoff);
-DUMMY(create_module);
 DUMMY(init_module);
 DUMMY(delete_module);
-DUMMY(get_kernel_syms);
-DUMMY(query_module);
 DUMMY(quotactl);
-DUMMY(nfsservctl);
-DUMMY(getpmsg);
-DUMMY(putpmsg);
-DUMMY(afs_syscall);
-DUMMY(tuxcall);
-DUMMY(security);
-DUMMY(set_thread_area);
 DUMMY(lookup_dcookie);
-DUMMY(epoll_ctl_old);
-DUMMY(epoll_wait_old);
 DUMMY(remap_file_pages);
 DUMMY(semtimedop);
 DUMMY(mbind);

Modified: stable/11/sys/amd64/linux/syscalls.master
==============================================================================
--- stable/11/sys/amd64/linux/syscalls.master	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/amd64/linux/syscalls.master	Tue Apr 11 12:49:25 2017	(r316701)
@@ -333,18 +333,18 @@
 				    l_int len); }
 172	AUE_NULL	STD	{ int linux_iopl(l_uint level); }
 173	AUE_NULL	UNIMPL	ioperm
-174	AUE_NULL	STD	{ int linux_create_module(void); }
+174	AUE_NULL	UNIMPL	create_module
 175	AUE_NULL	STD	{ int linux_init_module(void); }
 176	AUE_NULL	STD	{ int linux_delete_module(void); }
-177	AUE_NULL	STD	{ int linux_get_kernel_syms(void); }
-178	AUE_NULL	STD	{ int linux_query_module(void); }
+177	AUE_NULL	UNIMPL	get_kernel_syms
+178	AUE_NULL	UNIMPL	query_module
 179	AUE_QUOTACTL	STD	{ int linux_quotactl(void); }
-180	AUE_NULL	STD	{ int linux_nfsservctl(void); }
-181	AUE_GETPMSG	STD	{ int linux_getpmsg(void); }
-182	AUE_PUTPMSG	STD	{ int linux_putpmsg(void); }
-183	AUE_NULL	STD	{ int linux_afs_syscall(void); }
-184	AUE_NULL	STD	{ int linux_tuxcall(void); }
-185	AUE_NULL	STD	{ int linux_security(void); }
+180	AUE_NULL	UNIMPL	nfsservctl
+181	AUE_GETPMSG	UNIMPL	getpmsg
+182	AUE_PUTPMSG	UNIMPL	putpmsg
+183	AUE_NULL	UNIMPL	afs_syscall
+184	AUE_NULL	UNIMPL	tuxcall
+185	AUE_NULL	UNIMPL	security
 186	AUE_NULL	STD	{ int linux_gettid(void); }
 187	AUE_NULL	UNIMPL	linux_readahead
 188	AUE_NULL	STD	{ int linux_setxattr(void); }
@@ -367,17 +367,17 @@
 				    l_ulong *user_mask_ptr); }
 204	AUE_NULL	STD	{ int linux_sched_getaffinity(l_pid_t pid, l_uint len, \
 				    l_ulong *user_mask_ptr); }
-205	AUE_NULL	STD	{ int linux_set_thread_area(void); }
+205	AUE_NULL	UNIMPL	set_thread_area
 206	AUE_NULL	UNIMPL	linux_io_setup
 207	AUE_NULL	UNIMPL	linux_io_destroy
 208	AUE_NULL	UNIMPL	linux_io_getevents
 209	AUE_NULL	UNIMPL	linux_io_submit
 210	AUE_NULL	UNIMPL	linux_io_cancel
-211	AUE_NULL	UNIMPL	linux_get_thread_area
+211	AUE_NULL	UNIMPL	get_thread_area
 212	AUE_NULL	STD	{ int linux_lookup_dcookie(void); }
 213	AUE_NULL	STD	{ int linux_epoll_create(l_int size); }
-214	AUE_NULL	STD	{ int linux_epoll_ctl_old(void); }
-215	AUE_NULL	STD	{ int linux_epoll_wait_old(void); }
+214	AUE_NULL	UNIMPL	epoll_ctl_old
+215	AUE_NULL	UNIMPL	epoll_wait_old
 216	AUE_NULL	STD	{ int linux_remap_file_pages(void); }
 217	AUE_GETDIRENTRIES	STD { int linux_getdents64(l_uint fd, \
 				    void *dirent, l_uint count); }

Modified: stable/11/sys/amd64/linux32/linux32_dummy.c
==============================================================================
--- stable/11/sys/amd64/linux32/linux32_dummy.c	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/amd64/linux32/linux32_dummy.c	Tue Apr 11 12:49:25 2017	(r316701)
@@ -45,6 +45,24 @@ __FBSDID("$FreeBSD$");
 /* DTrace init */
 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
 
+UNIMPLEMENTED(afs_syscall);
+UNIMPLEMENTED(break);
+UNIMPLEMENTED(create_module);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(ftime);
+UNIMPLEMENTED(get_kernel_syms);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(getpmsg);
+UNIMPLEMENTED(gtty);
+UNIMPLEMENTED(stty);
+UNIMPLEMENTED(lock);
+UNIMPLEMENTED(mpx);
+UNIMPLEMENTED(nfsservctl);	/* added in linux 2.2 removed in 3.1 */
+UNIMPLEMENTED(prof);
+UNIMPLEMENTED(profil);
+UNIMPLEMENTED(putpmsg);
+UNIMPLEMENTED(query_module);	/* added in linux 2.2 removed in 2.6 */
+UNIMPLEMENTED(ulimit);
+UNIMPLEMENTED(vserver);
+
 DUMMY(stime);
 DUMMY(olduname);
 DUMMY(syslog);
@@ -52,15 +70,11 @@ DUMMY(uname);
 DUMMY(vhangup);
 DUMMY(swapoff);
 DUMMY(adjtimex);
-DUMMY(create_module);
 DUMMY(init_module);
 DUMMY(delete_module);
-DUMMY(get_kernel_syms);
 DUMMY(quotactl);
 DUMMY(bdflush);
 DUMMY(sysfs);
-DUMMY(query_module);
-DUMMY(nfsservctl);
 DUMMY(sendfile);
 DUMMY(setfsuid);
 DUMMY(setfsgid);

Modified: stable/11/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/11/sys/amd64/linux32/syscalls.master	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/amd64/linux32/syscalls.master	Tue Apr 11 12:49:25 2017	(r316701)
@@ -230,10 +230,10 @@
 				    int prot); }
 126	AUE_SIGPROCMASK	STD	{ int linux_sigprocmask(l_int how, \
 				    l_osigset_t *mask, l_osigset_t *omask); }
-127	AUE_NULL	STD	{ int linux_create_module(void); }
+127	AUE_NULL	UNIMPL	create_module
 128	AUE_NULL	STD	{ int linux_init_module(void); }
 129	AUE_NULL	STD	{ int linux_delete_module(void); }
-130	AUE_NULL	STD	{ int linux_get_kernel_syms(void); }
+130	AUE_NULL	UNIMPL	get_kernel_syms
 131	AUE_QUOTACTL	STD	{ int linux_quotactl(void); }
 132	AUE_GETPGID	NOPROTO	{ int getpgid(int pid); }
 133	AUE_FCHDIR	NOPROTO	{ int fchdir(int fd); }
@@ -296,10 +296,10 @@
 165	AUE_GETRESUID	STD	{ int linux_getresuid16(l_uid16_t *ruid, \
 				    l_uid16_t *euid, l_uid16_t *suid); }
 166	AUE_NULL	UNIMPL	vm86
-167	AUE_NULL	STD	{ int linux_query_module(void); }
+167	AUE_NULL	UNIMPL	query_module
 168	AUE_POLL	NOPROTO	{ int poll(struct pollfd *fds, \
 				    unsigned int nfds, int timeout); }
-169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
+169	AUE_NULL	UNIMPL	nfsservctl
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \
 				    l_gid16_t egid, l_gid16_t sgid); }
 171	AUE_GETRESGID	STD	{ int linux_getresgid16(l_gid16_t *rgid, \

Modified: stable/11/sys/compat/linux/linux_util.h
==============================================================================
--- stable/11/sys/compat/linux/linux_util.h	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/compat/linux/linux_util.h	Tue Apr 11 12:49:25 2017	(r316701)
@@ -93,6 +93,14 @@ linux_ ## s(struct thread *td, struct li
 }									\
 struct __hack
 
+/*
+ * This is for the syscalls that are not even yet implemented in Linux.
+ *
+ * They're marked as UNIMPL in syscall.master so it will
+ * have nosys record in linux_sysent[].
+ */
+#define UNIMPLEMENTED(s)
+
 void linux_msg(const struct thread *td, const char *fmt, ...)
 	__printflike(2, 3);
 

Modified: stable/11/sys/i386/linux/linux_dummy.c
==============================================================================
--- stable/11/sys/i386/linux/linux_dummy.c	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/i386/linux/linux_dummy.c	Tue Apr 11 12:49:25 2017	(r316701)
@@ -45,6 +45,24 @@ __FBSDID("$FreeBSD$");
 /* DTrace init */
 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
 
+UNIMPLEMENTED(afs_syscall);
+UNIMPLEMENTED(break);
+UNIMPLEMENTED(create_module);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(ftime);
+UNIMPLEMENTED(get_kernel_syms);	/* added in linux 1.0 removed in 2.6 */
+UNIMPLEMENTED(getpmsg);
+UNIMPLEMENTED(gtty);
+UNIMPLEMENTED(stty);
+UNIMPLEMENTED(lock);
+UNIMPLEMENTED(mpx);
+UNIMPLEMENTED(nfsservctl);	/* added in linux 2.2 removed in 3.1 */
+UNIMPLEMENTED(prof);
+UNIMPLEMENTED(profil);
+UNIMPLEMENTED(putpmsg);
+UNIMPLEMENTED(query_module);	/* added in linux 2.2 removed in 2.6 */
+UNIMPLEMENTED(ulimit);
+UNIMPLEMENTED(vserver);
+
 DUMMY(stime);
 DUMMY(fstat);
 DUMMY(olduname);
@@ -54,16 +72,12 @@ DUMMY(vhangup);
 DUMMY(vm86old);
 DUMMY(swapoff);
 DUMMY(adjtimex);
-DUMMY(create_module);
 DUMMY(init_module);
 DUMMY(delete_module);
-DUMMY(get_kernel_syms);
 DUMMY(quotactl);
 DUMMY(bdflush);
 DUMMY(sysfs);
 DUMMY(vm86);
-DUMMY(query_module);
-DUMMY(nfsservctl);
 DUMMY(sendfile);		/* different semantics */
 DUMMY(setfsuid);
 DUMMY(setfsgid);

Modified: stable/11/sys/i386/linux/syscalls.master
==============================================================================
--- stable/11/sys/i386/linux/syscalls.master	Tue Apr 11 12:38:42 2017	(r316700)
+++ stable/11/sys/i386/linux/syscalls.master	Tue Apr 11 12:49:25 2017	(r316701)
@@ -232,10 +232,10 @@
 				    int prot); }
 126	AUE_SIGPROCMASK	STD	{ int linux_sigprocmask(l_int how, \
 				    l_osigset_t *mask, l_osigset_t *omask); }
-127	AUE_NULL	STD	{ int linux_create_module(void); }
+127	AUE_NULL	UNIMPL	create_module
 128	AUE_NULL	STD	{ int linux_init_module(void); }
 129	AUE_NULL	STD	{ int linux_delete_module(void); }
-130	AUE_NULL	STD	{ int linux_get_kernel_syms(void); }
+130	AUE_NULL	UNIMPL	get_kernel_syms
 131	AUE_QUOTACTL	STD	{ int linux_quotactl(void); }
 132	AUE_GETPGID	NOPROTO	{ int getpgid(int pid); }
 133	AUE_FCHDIR	NOPROTO	{ int fchdir(int fd); }
@@ -298,10 +298,10 @@
 165	AUE_GETRESUID	STD	{ int linux_getresuid16(l_uid16_t *ruid, \
 				    l_uid16_t *euid, l_uid16_t *suid); }
 166	AUE_NULL	STD	{ int linux_vm86(void); }
-167	AUE_NULL	STD	{ int linux_query_module(void); }
+167	AUE_NULL	UNIMPL	query_module
 168	AUE_POLL	NOPROTO	{ int poll(struct pollfd* fds, \
 				    unsigned int nfds, long timeout); }
-169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
+169	AUE_NULL	UNIMPL	nfsservctl
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \
 				    l_gid16_t egid, l_gid16_t sgid); }
 171	AUE_GETRESGID	STD	{ int linux_getresgid16(l_gid16_t *rgid, \



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?201704111249.v3BCnPhc034464>