Bug 152822 - [patch] DTrace: syscall provider for compat/freebsd32
Summary: [patch] DTrace: syscall provider for compat/freebsd32
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Artem Belevich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 05:20 UTC by Artem Belevich
Modified: 2011-06-28 03:04 UTC (History)
0 users

See Also:


Attachments
file.txt (4.31 KB, text/plain)
2010-12-04 05:20 UTC, Artem Belevich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Belevich 2010-12-04 05:20:10 UTC
syscall provider on amd64 does not allow probing of compat/freebsd32 apps.

Fix: Dtrace's syscall provider only probes syscalls delivered via sysent.
32-bit emulation uses freebsd32_sysent and thus is not served by regular syscall provider.

Patch attached with submission follows:
How-To-Repeat: ## use amd64 box
## run some 32-bit apps
#sudo dtrace -n 'syscall:::entry { @num[execname] = count(); }';

None of 32-bit apps show up in the output.
Comment 1 Andriy Gapon freebsd_committer freebsd_triage 2010-12-20 11:16:09 UTC
Responsible Changed
From-To: freebsd-bugs->avg

I will look into this.
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-03-12 08:51:56 UTC
Author: avg
Date: Sat Mar 12 08:51:43 2011
New Revision: 219559
URL: http://svn.freebsd.org/changeset/base/219559

Log:
  add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  This commits makes necessary changes in syscall/sysent generation
  infrastructure.
  
  PR:		kern/152822
  Submitted by:	Artem Belevich <fbsdlist@src.cx>
  Reviewed by:	jhb (ealier version)
  MFC after:	3 weeks

Modified:
  head/sys/amd64/linux32/Makefile
  head/sys/amd64/linux32/syscalls.conf
  head/sys/amd64/linux32/syscalls.master
  head/sys/compat/freebsd32/Makefile
  head/sys/compat/freebsd32/syscalls.conf
  head/sys/i386/linux/Makefile
  head/sys/i386/linux/syscalls.conf
  head/sys/i386/linux/syscalls.master
  head/sys/kern/makesyscalls.sh

Modified: head/sys/amd64/linux32/Makefile
==============================================================================
--- head/sys/amd64/linux32/Makefile	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/amd64/linux32/Makefile	Sat Mar 12 08:51:43 2011	(r219559)
@@ -5,11 +5,13 @@
 all:
 	@echo "make sysent only"
 
-sysent:  linux32_sysent.c linux32_syscall.h linux32_proto.h
+sysent:  linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c
 
-linux32_sysent.c linux32_syscall.h linux32_proto.h: ../../kern/makesyscalls.sh \
+linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \
 		syscalls.master syscalls.conf
 	-mv -f linux32_sysent.c linux32_sysent.c.bak
 	-mv -f linux32_syscall.h linux32_syscall.h.bak
 	-mv -f linux32_proto.h linux32_proto.h.bak
+	-mv -f linux32_syscalls.c linux32_syscalls.c.bak
+	-mv -f linux32_systrace_args.c linux32_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

Modified: head/sys/amd64/linux32/syscalls.conf
==============================================================================
--- head/sys/amd64/linux32/syscalls.conf	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/amd64/linux32/syscalls.conf	Sat Mar 12 08:51:43 2011	(r219559)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-sysnames="/dev/null"
+sysnames="linux32_syscalls.c"
 sysproto="linux32_proto.h"
 sysproto_h=_LINUX_SYSPROTO_H_
 syshdr="linux32_syscall.h"
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="LINUX_SYS_"
 switchname="linux_sysent"
 namesname="linux_syscallnames"
-systrace="/dev/null"
+systrace="linux32_systrace_args.c"

Modified: head/sys/amd64/linux32/syscalls.master
==============================================================================
--- head/sys/amd64/linux32/syscalls.master	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/amd64/linux32/syscalls.master	Sat Mar 12 08:51:43 2011	(r219559)
@@ -291,7 +291,7 @@
 				    l_uid16_t *euid, l_uid16_t *suid); }
 166	AUE_NULL	UNIMPL	vm86
 167	AUE_NULL	STD	{ int linux_query_module(void); }
-168	AUE_POLL	NOPROTO	{ int poll(struct pollfd*, \
+168	AUE_POLL	NOPROTO	{ int poll(struct pollfd *fds, \
 				    unsigned int nfds, int timeout); }
 169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \

Modified: head/sys/compat/freebsd32/Makefile
==============================================================================
--- head/sys/compat/freebsd32/Makefile	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/compat/freebsd32/Makefile	Sat Mar 12 08:51:43 2011	(r219559)
@@ -5,15 +5,17 @@
 all:
 	@echo "make sysent only"
 
-sysent:  freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h
+sysent:  freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c
 
-freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h: \
+freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \
 	    ../../kern/makesyscalls.sh syscalls.master syscalls.conf
 	-mv -f freebsd32_sysent.c freebsd32_sysent.c.bak
 	-mv -f freebsd32_syscalls.c freebsd32_syscalls.c.bak
 	-mv -f freebsd32_syscall.h freebsd32_syscall.h.bak
 	-mv -f freebsd32_proto.h freebsd32_proto.h.bak
+	-mv -f freebsd32_systrace_args.c  freebsd32_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
 
 clean:
 	rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h
+	rm -f freebsd32_systrace_args.c 

Modified: head/sys/compat/freebsd32/syscalls.conf
==============================================================================
--- head/sys/compat/freebsd32/syscalls.conf	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/compat/freebsd32/syscalls.conf	Sat Mar 12 08:51:43 2011	(r219559)
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="FREEBSD32_SYS_"
 switchname="freebsd32_sysent"
 namesname="freebsd32_syscallnames"
-systrace="/dev/null"
+systrace="freebsd32_systrace_args.c"

Modified: head/sys/i386/linux/Makefile
==============================================================================
--- head/sys/i386/linux/Makefile	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/i386/linux/Makefile	Sat Mar 12 08:51:43 2011	(r219559)
@@ -5,11 +5,13 @@
 all:
 	@echo "make sysent only"
 
-sysent:  linux_sysent.c linux_syscall.h linux_proto.h
+sysent:  linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c
 
-linux_sysent.c linux_syscall.h linux_proto.h: ../../kern/makesyscalls.sh \
-		syscalls.master syscalls.conf
+linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \
+		../../kern/makesyscalls.sh syscalls.master syscalls.conf
 	-mv -f linux_sysent.c linux_sysent.c.bak
 	-mv -f linux_syscall.h linux_syscall.h.bak
 	-mv -f linux_proto.h linux_proto.h.bak
+	-mv -f linux_syscalls.c linux_syscalls.c.bak
+	-mv -f linux_systrace_args.c linux_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

Modified: head/sys/i386/linux/syscalls.conf
==============================================================================
--- head/sys/i386/linux/syscalls.conf	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/i386/linux/syscalls.conf	Sat Mar 12 08:51:43 2011	(r219559)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-sysnames="/dev/null"
+sysnames="linux_syscalls.c"
 sysproto="linux_proto.h"
 sysproto_h=_LINUX_SYSPROTO_H_
 syshdr="linux_syscall.h"
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="LINUX_SYS_"
 switchname="linux_sysent"
 namesname="linux_syscallnames"
-systrace="/dev/null"
+systrace="linux_systrace_args.c"

Modified: head/sys/i386/linux/syscalls.master
==============================================================================
--- head/sys/i386/linux/syscalls.master	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/i386/linux/syscalls.master	Sat Mar 12 08:51:43 2011	(r219559)
@@ -102,7 +102,7 @@
 46	AUE_SETGID	STD	{ int linux_setgid16(l_gid16_t gid); }
 47	AUE_GETGID	STD	{ int linux_getgid16(void); }
 48	AUE_NULL	STD	{ int linux_signal(l_int sig, \
-				    l_handler_t handler); }
+				    void *handler); }
 49	AUE_GETEUID	STD	{ int linux_geteuid16(void); }
 50	AUE_GETEGID	STD	{ int linux_getegid16(void); }
 51	AUE_ACCT	NOPROTO	{ int acct(char *path); }
@@ -148,7 +148,7 @@
 				    struct timeval *tp, \
 				    struct timezone *tzp); }
 79	AUE_SETTIMEOFDAY	NOPROTO	{ int settimeofday( \
-				    struct timeval *tp, \
+				    struct timeval *tv, \
 				    struct timezone *tzp); }
 80	AUE_GETGROUPS	STD	{ int linux_getgroups16(l_uint gidsetsize, \
 				    l_gid16_t *gidset); }
@@ -293,7 +293,7 @@
 				    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); }
-168	AUE_POLL	NOPROTO	{ int poll(struct pollfd*, \
+168	AUE_POLL	NOPROTO	{ int poll(struct pollfd* fds, \
 				    unsigned int nfds, long timeout); }
 169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Sat Mar 12 07:47:05 2011	(r219558)
+++ head/sys/kern/makesyscalls.sh	Sat Mar 12 08:51:43 2011	(r219559)
@@ -200,6 +200,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		savesyscall = syscall
 		next
 	}
@@ -212,6 +214,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		syscall = savesyscall
 		next
 	}
@@ -224,6 +228,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		next
 	}
 	syscall != $1 {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-03-12 08:58:34 UTC
Author: avg
Date: Sat Mar 12 08:58:19 2011
New Revision: 219560
URL: http://svn.freebsd.org/changeset/base/219560

Log:
  add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  Regenerate system call and systrace support files.
  
  PR:		kern/152822
  Submitted by:	Artem Belevich <fbsdlist@src.cx>
  Reviewed by:	jhb (earlier version)
  MFC after:	3 weeks

Added:
  head/sys/amd64/linux32/linux32_syscalls.c   (contents, props changed)
  head/sys/amd64/linux32/linux32_systrace_args.c   (contents, props changed)
  head/sys/compat/freebsd32/freebsd32_systrace_args.c   (contents, props changed)
  head/sys/i386/linux/linux_syscalls.c   (contents, props changed)
  head/sys/i386/linux/linux_systrace_args.c   (contents, props changed)
Modified:
  head/sys/amd64/linux32/linux32_proto.h
  head/sys/amd64/linux32/linux32_syscall.h
  head/sys/amd64/linux32/linux32_sysent.c
  head/sys/i386/linux/linux_proto.h
  head/sys/i386/linux/linux_syscall.h
  head/sys/i386/linux/linux_sysent.c

Modified: head/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- head/sys/amd64/linux32/linux32_proto.h	Sat Mar 12 08:51:43 2011	(r219559)
+++ head/sys/amd64/linux32/linux32_proto.h	Sat Mar 12 08:58:19 2011	(r219560)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 218610 2011-02-12 15:33:25Z dchagin 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg 
  */
 
 #ifndef _LINUX_SYSPROTO_H_

Modified: head/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- head/sys/amd64/linux32/linux32_syscall.h	Sat Mar 12 08:51:43 2011	(r219559)
+++ head/sys/amd64/linux32/linux32_syscall.h	Sat Mar 12 08:58:19 2011	(r219560)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 218610 2011-02-12 15:33:25Z dchagin 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg 
  */
 
 #define	LINUX_SYS_exit	1

Added: head/sys/amd64/linux32/linux32_syscalls.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/amd64/linux32/linux32_syscalls.c	Sat Mar 12 08:58:19 2011	(r219560)
@@ -0,0 +1,328 @@
+/*
+ * System call names.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg 
+ */
+
+const char *linux_syscallnames[] = {
+#define	nosys	linux_nosys
+	"#0",			/* 0 = setup */
+	"exit",			/* 1 = exit */
+	"linux_fork",			/* 2 = linux_fork */
+	"read",			/* 3 = read */
+	"write",			/* 4 = write */
+	"linux_open",			/* 5 = linux_open */
+	"close",			/* 6 = close */
+	"linux_waitpid",			/* 7 = linux_waitpid */
+	"linux_creat",			/* 8 = linux_creat */
+	"linux_link",			/* 9 = linux_link */
+	"linux_unlink",			/* 10 = linux_unlink */
+	"linux_execve",			/* 11 = linux_execve */
+	"linux_chdir",			/* 12 = linux_chdir */
+	"linux_time",			/* 13 = linux_time */
+	"linux_mknod",			/* 14 = linux_mknod */
+	"linux_chmod",			/* 15 = linux_chmod */
+	"linux_lchown16",			/* 16 = linux_lchown16 */
+	"#17",			/* 17 = break */
+	"linux_stat",			/* 18 = linux_stat */
+	"linux_lseek",			/* 19 = linux_lseek */
+	"linux_getpid",			/* 20 = linux_getpid */
+	"linux_mount",			/* 21 = linux_mount */
+	"linux_oldumount",			/* 22 = linux_oldumount */
+	"linux_setuid16",			/* 23 = linux_setuid16 */
+	"linux_getuid16",			/* 24 = linux_getuid16 */
+	"linux_stime",			/* 25 = linux_stime */
+	"linux_ptrace",			/* 26 = linux_ptrace */
+	"linux_alarm",			/* 27 = linux_alarm */
+	"#28",			/* 28 = fstat */
+	"linux_pause",			/* 29 = linux_pause */
+	"linux_utime",			/* 30 = linux_utime */
+	"#31",			/* 31 = stty */
+	"#32",			/* 32 = gtty */
+	"linux_access",			/* 33 = linux_access */
+	"linux_nice",			/* 34 = linux_nice */
+	"#35",			/* 35 = ftime */
+	"sync",			/* 36 = sync */
+	"linux_kill",			/* 37 = linux_kill */
+	"linux_rename",			/* 38 = linux_rename */
+	"linux_mkdir",			/* 39 = linux_mkdir */
+	"linux_rmdir",			/* 40 = linux_rmdir */
+	"dup",			/* 41 = dup */
+	"linux_pipe",			/* 42 = linux_pipe */
+	"linux_times",			/* 43 = linux_times */
+	"#44",			/* 44 = prof */
+	"linux_brk",			/* 45 = linux_brk */
+	"linux_setgid16",			/* 46 = linux_setgid16 */
+	"linux_getgid16",			/* 47 = linux_getgid16 */
+	"linux_signal",			/* 48 = linux_signal */
+	"linux_geteuid16",			/* 49 = linux_geteuid16 */
+	"linux_getegid16",			/* 50 = linux_getegid16 */
+	"acct",			/* 51 = acct */
+	"linux_umount",			/* 52 = linux_umount */
+	"#53",			/* 53 = lock */
+	"linux_ioctl",			/* 54 = linux_ioctl */
+	"linux_fcntl",			/* 55 = linux_fcntl */
+	"#56",			/* 56 = mpx */
+	"setpgid",			/* 57 = setpgid */
+	"#58",			/* 58 = ulimit */
+	"linux_olduname",			/* 59 = linux_olduname */
+	"umask",			/* 60 = umask */
+	"chroot",			/* 61 = chroot */
+	"linux_ustat",			/* 62 = linux_ustat */
+	"dup2",			/* 63 = dup2 */
+	"linux_getppid",			/* 64 = linux_getppid */
+	"getpgrp",			/* 65 = getpgrp */
+	"setsid",			/* 66 = setsid */
+	"linux_sigaction",			/* 67 = linux_sigaction */
+	"linux_sgetmask",			/* 68 = linux_sgetmask */
+	"linux_ssetmask",			/* 69 = linux_ssetmask */
+	"linux_setreuid16",			/* 70 = linux_setreuid16 */
+	"linux_setregid16",			/* 71 = linux_setregid16 */
+	"linux_sigsuspend",			/* 72 = linux_sigsuspend */
+	"linux_sigpending",			/* 73 = linux_sigpending */
+	"linux_sethostname",			/* 74 = linux_sethostname */
+	"linux_setrlimit",			/* 75 = linux_setrlimit */
+	"linux_old_getrlimit",			/* 76 = linux_old_getrlimit */
+	"linux_getrusage",			/* 77 = linux_getrusage */
+	"linux_gettimeofday",			/* 78 = linux_gettimeofday */
+	"linux_settimeofday",			/* 79 = linux_settimeofday */
+	"linux_getgroups16",			/* 80 = linux_getgroups16 */
+	"linux_setgroups16",			/* 81 = linux_setgroups16 */
+	"linux_old_select",			/* 82 = linux_old_select */
+	"linux_symlink",			/* 83 = linux_symlink */
+	"linux_lstat",			/* 84 = linux_lstat */
+	"linux_readlink",			/* 85 = linux_readlink */
+	"#86",			/* 86 = linux_uselib */
+	"swapon",			/* 87 = swapon */
+	"linux_reboot",			/* 88 = linux_reboot */
+	"linux_readdir",			/* 89 = linux_readdir */
+	"linux_mmap",			/* 90 = linux_mmap */
+	"munmap",			/* 91 = munmap */
+	"linux_truncate",			/* 92 = linux_truncate */
+	"linux_ftruncate",			/* 93 = linux_ftruncate */
+	"fchmod",			/* 94 = fchmod */
+	"fchown",			/* 95 = fchown */
+	"linux_getpriority",			/* 96 = linux_getpriority */
+	"setpriority",			/* 97 = setpriority */
+	"#98",			/* 98 = profil */
+	"linux_statfs",			/* 99 = linux_statfs */
+	"linux_fstatfs",			/* 100 = linux_fstatfs */
+	"#101",			/* 101 = ioperm */
+	"linux_socketcall",			/* 102 = linux_socketcall */
+	"linux_syslog",			/* 103 = linux_syslog */
+	"linux_setitimer",			/* 104 = linux_setitimer */
+	"linux_getitimer",			/* 105 = linux_getitimer */
+	"linux_newstat",			/* 106 = linux_newstat */
+	"linux_newlstat",			/* 107 = linux_newlstat */
+	"linux_newfstat",			/* 108 = linux_newfstat */
+	"linux_uname",			/* 109 = linux_uname */
+	"linux_iopl",			/* 110 = linux_iopl */
+	"linux_vhangup",			/* 111 = linux_vhangup */
+	"#112",			/* 112 = idle */
+	"#113",			/* 113 = vm86old */
+	"linux_wait4",			/* 114 = linux_wait4 */
+	"linux_swapoff",			/* 115 = linux_swapoff */
+	"linux_sysinfo",			/* 116 = linux_sysinfo */
+	"linux_ipc",			/* 117 = linux_ipc */
+	"fsync",			/* 118 = fsync */
+	"linux_sigreturn",			/* 119 = linux_sigreturn */
+	"linux_clone",			/* 120 = linux_clone */
+	"linux_setdomainname",			/* 121 = linux_setdomainname */
+	"linux_newuname",			/* 122 = linux_newuname */
+	"#123",			/* 123 = modify_ldt */
+	"linux_adjtimex",			/* 124 = linux_adjtimex */
+	"linux_mprotect",			/* 125 = linux_mprotect */
+	"linux_sigprocmask",			/* 126 = linux_sigprocmask */
+	"linux_create_module",			/* 127 = linux_create_module */
+	"linux_init_module",			/* 128 = linux_init_module */
+	"linux_delete_module",			/* 129 = linux_delete_module */
+	"linux_get_kernel_syms",			/* 130 = linux_get_kernel_syms */
+	"linux_quotactl",			/* 131 = linux_quotactl */
+	"getpgid",			/* 132 = getpgid */
+	"fchdir",			/* 133 = fchdir */
+	"linux_bdflush",			/* 134 = linux_bdflush */
+	"linux_sysfs",			/* 135 = linux_sysfs */
+	"linux_personality",			/* 136 = linux_personality */
+	"#137",			/* 137 = afs_syscall */
+	"linux_setfsuid16",			/* 138 = linux_setfsuid16 */
+	"linux_setfsgid16",			/* 139 = linux_setfsgid16 */
+	"linux_llseek",			/* 140 = linux_llseek */
+	"linux_getdents",			/* 141 = linux_getdents */
+	"linux_select",			/* 142 = linux_select */
+	"flock",			/* 143 = flock */
+	"linux_msync",			/* 144 = linux_msync */
+	"linux_readv",			/* 145 = linux_readv */
+	"linux_writev",			/* 146 = linux_writev */
+	"linux_getsid",			/* 147 = linux_getsid */
+	"linux_fdatasync",			/* 148 = linux_fdatasync */
+	"linux_sysctl",			/* 149 = linux_sysctl */
+	"mlock",			/* 150 = mlock */
+	"munlock",			/* 151 = munlock */
+	"mlockall",			/* 152 = mlockall */
+	"munlockall",			/* 153 = munlockall */
+	"sched_setparam",			/* 154 = sched_setparam */
+	"sched_getparam",			/* 155 = sched_getparam */
+	"linux_sched_setscheduler",			/* 156 = linux_sched_setscheduler */
+	"linux_sched_getscheduler",			/* 157 = linux_sched_getscheduler */
+	"sched_yield",			/* 158 = sched_yield */
+	"linux_sched_get_priority_max",			/* 159 = linux_sched_get_priority_max */
+	"linux_sched_get_priority_min",			/* 160 = linux_sched_get_priority_min */
+	"linux_sched_rr_get_interval",			/* 161 = linux_sched_rr_get_interval */
+	"linux_nanosleep",			/* 162 = linux_nanosleep */
+	"linux_mremap",			/* 163 = linux_mremap */
+	"linux_setresuid16",			/* 164 = linux_setresuid16 */
+	"linux_getresuid16",			/* 165 = linux_getresuid16 */
+	"#166",			/* 166 = vm86 */
+	"linux_query_module",			/* 167 = linux_query_module */
+	"poll",			/* 168 = poll */
+	"linux_nfsservctl",			/* 169 = linux_nfsservctl */
+	"linux_setresgid16",			/* 170 = linux_setresgid16 */
+	"linux_getresgid16",			/* 171 = linux_getresgid16 */
+	"linux_prctl",			/* 172 = linux_prctl */
+	"linux_rt_sigreturn",			/* 173 = linux_rt_sigreturn */
+	"linux_rt_sigaction",			/* 174 = linux_rt_sigaction */
+	"linux_rt_sigprocmask",			/* 175 = linux_rt_sigprocmask */
+	"linux_rt_sigpending",			/* 176 = linux_rt_sigpending */
+	"linux_rt_sigtimedwait",			/* 177 = linux_rt_sigtimedwait */
+	"linux_rt_sigqueueinfo",			/* 178 = linux_rt_sigqueueinfo */
+	"linux_rt_sigsuspend",			/* 179 = linux_rt_sigsuspend */
+	"linux_pread",			/* 180 = linux_pread */
+	"linux_pwrite",			/* 181 = linux_pwrite */
+	"linux_chown16",			/* 182 = linux_chown16 */
+	"linux_getcwd",			/* 183 = linux_getcwd */
+	"linux_capget",			/* 184 = linux_capget */
+	"linux_capset",			/* 185 = linux_capset */
+	"linux_sigaltstack",			/* 186 = linux_sigaltstack */
+	"linux_sendfile",			/* 187 = linux_sendfile */
+	"#188",			/* 188 = getpmsg */
+	"#189",			/* 189 = putpmsg */
+	"linux_vfork",			/* 190 = linux_vfork */
+	"linux_getrlimit",			/* 191 = linux_getrlimit */
+	"linux_mmap2",			/* 192 = linux_mmap2 */
+	"linux_truncate64",			/* 193 = linux_truncate64 */
+	"linux_ftruncate64",			/* 194 = linux_ftruncate64 */
+	"linux_stat64",			/* 195 = linux_stat64 */
+	"linux_lstat64",			/* 196 = linux_lstat64 */
+	"linux_fstat64",			/* 197 = linux_fstat64 */
+	"linux_lchown",			/* 198 = linux_lchown */
+	"linux_getuid",			/* 199 = linux_getuid */
+	"linux_getgid",			/* 200 = linux_getgid */
+	"geteuid",			/* 201 = geteuid */
+	"getegid",			/* 202 = getegid */
+	"setreuid",			/* 203 = setreuid */
+	"setregid",			/* 204 = setregid */
+	"linux_getgroups",			/* 205 = linux_getgroups */
+	"linux_setgroups",			/* 206 = linux_setgroups */
+	"fchown",			/* 207 = fchown */
+	"setresuid",			/* 208 = setresuid */
+	"getresuid",			/* 209 = getresuid */
+	"setresgid",			/* 210 = setresgid */
+	"getresgid",			/* 211 = getresgid */
+	"linux_chown",			/* 212 = linux_chown */
+	"setuid",			/* 213 = setuid */
+	"setgid",			/* 214 = setgid */
+	"linux_setfsuid",			/* 215 = linux_setfsuid */
+	"linux_setfsgid",			/* 216 = linux_setfsgid */
+	"linux_pivot_root",			/* 217 = linux_pivot_root */
+	"linux_mincore",			/* 218 = linux_mincore */
+	"madvise",			/* 219 = madvise */
+	"linux_getdents64",			/* 220 = linux_getdents64 */
+	"linux_fcntl64",			/* 221 = linux_fcntl64 */
+	"#222",			/* 222 =  */
+	"#223",			/* 223 =  */
+	"linux_gettid",			/* 224 = linux_gettid */
+	"#225",			/* 225 = linux_readahead */
+	"linux_setxattr",			/* 226 = linux_setxattr */
+	"linux_lsetxattr",			/* 227 = linux_lsetxattr */
+	"linux_fsetxattr",			/* 228 = linux_fsetxattr */
+	"linux_getxattr",			/* 229 = linux_getxattr */
+	"linux_lgetxattr",			/* 230 = linux_lgetxattr */
+	"linux_fgetxattr",			/* 231 = linux_fgetxattr */
+	"linux_listxattr",			/* 232 = linux_listxattr */
+	"linux_llistxattr",			/* 233 = linux_llistxattr */
+	"linux_flistxattr",			/* 234 = linux_flistxattr */
+	"linux_removexattr",			/* 235 = linux_removexattr */
+	"linux_lremovexattr",			/* 236 = linux_lremovexattr */
+	"linux_fremovexattr",			/* 237 = linux_fremovexattr */
+	"linux_tkill",			/* 238 = linux_tkill */
+	"#239",			/* 239 = linux_sendfile64 */
+	"linux_sys_futex",			/* 240 = linux_sys_futex */
+	"linux_sched_setaffinity",			/* 241 = linux_sched_setaffinity */
+	"linux_sched_getaffinity",			/* 242 = linux_sched_getaffinity */
+	"linux_set_thread_area",			/* 243 = linux_set_thread_area */
+	"#244",			/* 244 = linux_get_thread_area */
+	"#245",			/* 245 = linux_io_setup */
+	"#246",			/* 246 = linux_io_destroy */
+	"#247",			/* 247 = linux_io_getevents */
+	"#248",			/* 248 = linux_io_submit */
+	"#249",			/* 249 = linux_io_cancel */
+	"linux_fadvise64",			/* 250 = linux_fadvise64 */
+	"#251",			/* 251 =  */
+	"linux_exit_group",			/* 252 = linux_exit_group */
+	"linux_lookup_dcookie",			/* 253 = linux_lookup_dcookie */
+	"linux_epoll_create",			/* 254 = linux_epoll_create */
+	"linux_epoll_ctl",			/* 255 = linux_epoll_ctl */
+	"linux_epoll_wait",			/* 256 = linux_epoll_wait */
+	"linux_remap_file_pages",			/* 257 = linux_remap_file_pages */
+	"linux_set_tid_address",			/* 258 = linux_set_tid_address */
+	"linux_timer_create",			/* 259 = linux_timer_create */
+	"linux_timer_settime",			/* 260 = linux_timer_settime */
+	"linux_timer_gettime",			/* 261 = linux_timer_gettime */
+	"linux_timer_getoverrun",			/* 262 = linux_timer_getoverrun */
+	"linux_timer_delete",			/* 263 = linux_timer_delete */
+	"linux_clock_settime",			/* 264 = linux_clock_settime */
+	"linux_clock_gettime",			/* 265 = linux_clock_gettime */
+	"linux_clock_getres",			/* 266 = linux_clock_getres */
+	"linux_clock_nanosleep",			/* 267 = linux_clock_nanosleep */
+	"linux_statfs64",			/* 268 = linux_statfs64 */
+	"linux_fstatfs64",			/* 269 = linux_fstatfs64 */
+	"linux_tgkill",			/* 270 = linux_tgkill */
+	"linux_utimes",			/* 271 = linux_utimes */
+	"linux_fadvise64_64",			/* 272 = linux_fadvise64_64 */
+	"#273",			/* 273 =  */
+	"linux_mbind",			/* 274 = linux_mbind */
+	"linux_get_mempolicy",			/* 275 = linux_get_mempolicy */
+	"linux_set_mempolicy",			/* 276 = linux_set_mempolicy */
+	"linux_mq_open",			/* 277 = linux_mq_open */
+	"linux_mq_unlink",			/* 278 = linux_mq_unlink */
+	"linux_mq_timedsend",			/* 279 = linux_mq_timedsend */
+	"linux_mq_timedreceive",			/* 280 = linux_mq_timedreceive */
+	"linux_mq_notify",			/* 281 = linux_mq_notify */
+	"linux_mq_getsetattr",			/* 282 = linux_mq_getsetattr */
+	"linux_kexec_load",			/* 283 = linux_kexec_load */
+	"linux_waitid",			/* 284 = linux_waitid */
+	"#285",			/* 285 =  */
+	"linux_add_key",			/* 286 = linux_add_key */
+	"linux_request_key",			/* 287 = linux_request_key */
+	"linux_keyctl",			/* 288 = linux_keyctl */
+	"linux_ioprio_set",			/* 289 = linux_ioprio_set */
+	"linux_ioprio_get",			/* 290 = linux_ioprio_get */
+	"linux_inotify_init",			/* 291 = linux_inotify_init */
+	"linux_inotify_add_watch",			/* 292 = linux_inotify_add_watch */
+	"linux_inotify_rm_watch",			/* 293 = linux_inotify_rm_watch */
+	"linux_migrate_pages",			/* 294 = linux_migrate_pages */
+	"linux_openat",			/* 295 = linux_openat */
+	"linux_mkdirat",			/* 296 = linux_mkdirat */
+	"linux_mknodat",			/* 297 = linux_mknodat */
+	"linux_fchownat",			/* 298 = linux_fchownat */
+	"linux_futimesat",			/* 299 = linux_futimesat */
+	"linux_fstatat64",			/* 300 = linux_fstatat64 */
+	"linux_unlinkat",			/* 301 = linux_unlinkat */
+	"linux_renameat",			/* 302 = linux_renameat */
+	"linux_linkat",			/* 303 = linux_linkat */
+	"linux_symlinkat",			/* 304 = linux_symlinkat */
+	"linux_readlinkat",			/* 305 = linux_readlinkat */
+	"linux_fchmodat",			/* 306 = linux_fchmodat */
+	"linux_faccessat",			/* 307 = linux_faccessat */
+	"linux_pselect6",			/* 308 = linux_pselect6 */
+	"linux_ppoll",			/* 309 = linux_ppoll */
+	"linux_unshare",			/* 310 = linux_unshare */
+	"linux_set_robust_list",			/* 311 = linux_set_robust_list */
+	"linux_get_robust_list",			/* 312 = linux_get_robust_list */
+	"linux_splice",			/* 313 = linux_splice */
+	"linux_sync_file_range",			/* 314 = linux_sync_file_range */
+	"linux_tee",			/* 315 = linux_tee */
+	"linux_vmsplice",			/* 316 = linux_vmsplice */
+};

Modified: head/sys/amd64/linux32/linux32_sysent.c
==============================================================================
--- head/sys/amd64/linux32/linux32_sysent.c	Sat Mar 12 08:51:43 2011	(r219559)
+++ head/sys/amd64/linux32/linux32_sysent.c	Sat Mar 12 08:58:19 2011	(r219560)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 218610 2011-02-12 15:33:25Z dchagin 
+ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 219559 2011-03-12 08:51:43Z avg 
  */
 
 #include "opt_compat.h"

Added: head/sys/amd64/linux32/linux32_systrace_args.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/amd64/linux32/linux32_systrace_args.c	Sat Mar 12 08:58:19 2011	(r219560)
@@ -0,0 +1,5100 @@
+/*
+ * System call argument to DTrace register array converstion.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * This file is part of the DTrace syscall provider.
+ */
+
+static void
+systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
+{
+	int64_t *iarg  = (int64_t *) uarg;
+	switch (sysnum) {
+#define	nosys	linux_nosys
+	/* sys_exit */
+	case 1: {
+		struct sys_exit_args *p = params;
+		iarg[0] = p->rval; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_fork */
+	case 2: {
+		*n_args = 0;
+		break;
+	}
+	/* read */
+	case 3: {
+		struct read_args *p = params;
+		iarg[0] = p->fd; /* int */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		uarg[2] = p->nbyte; /* u_int */
+		*n_args = 3;
+		break;
+	}
+	/* write */
+	case 4: {
+		struct write_args *p = params;
+		iarg[0] = p->fd; /* int */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		uarg[2] = p->nbyte; /* u_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_open */
+	case 5: {
+		struct linux_open_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		iarg[2] = p->mode; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* close */
+	case 6: {
+		struct close_args *p = params;
+		iarg[0] = p->fd; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_waitpid */
+	case 7: {
+		struct linux_waitpid_args *p = params;
+		iarg[0] = p->pid; /* l_pid_t */
+		uarg[1] = (intptr_t) p->status; /* l_int * */
+		iarg[2] = p->options; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_creat */
+	case 8: {
+		struct linux_creat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_link */
+	case 9: {
+		struct linux_link_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_unlink */
+	case 10: {
+		struct linux_unlink_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_execve */
+	case 11: {
+		struct linux_execve_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->argp; /* u_int32_t * */
+		uarg[2] = (intptr_t) p->envp; /* u_int32_t * */
+		*n_args = 3;
+		break;
+	}
+	/* linux_chdir */
+	case 12: {
+		struct linux_chdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_time */
+	case 13: {
+		struct linux_time_args *p = params;
+		uarg[0] = (intptr_t) p->tm; /* l_time_t * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_mknod */
+	case 14: {
+		struct linux_mknod_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		iarg[2] = p->dev; /* l_dev_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_chmod */
+	case 15: {
+		struct linux_chmod_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_mode_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lchown16 */
+	case 16: {
+		struct linux_lchown16_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->uid; /* l_uid16_t */
+		iarg[2] = p->gid; /* l_gid16_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_stat */
+	case 18: {
+		struct linux_stat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->up; /* struct linux_stat * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lseek */
+	case 19: {
+		struct linux_lseek_args *p = params;
+		iarg[0] = p->fdes; /* l_uint */
+		iarg[1] = p->off; /* l_off_t */
+		iarg[2] = p->whence; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_getpid */
+	case 20: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_mount */
+	case 21: {
+		struct linux_mount_args *p = params;
+		uarg[0] = (intptr_t) p->specialfile; /* char * */
+		uarg[1] = (intptr_t) p->dir; /* char * */
+		uarg[2] = (intptr_t) p->filesystemtype; /* char * */
+		iarg[3] = p->rwflag; /* l_ulong */
+		uarg[4] = (intptr_t) p->data; /* void * */
+		*n_args = 5;
+		break;
+	}
+	/* linux_oldumount */
+	case 22: {
+		struct linux_oldumount_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setuid16 */
+	case 23: {
+		struct linux_setuid16_args *p = params;
+		iarg[0] = p->uid; /* l_uid16_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_getuid16 */
+	case 24: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_stime */
+	case 25: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_ptrace */
+	case 26: {
+		struct linux_ptrace_args *p = params;
+		iarg[0] = p->req; /* l_long */
+		iarg[1] = p->pid; /* l_long */
+		iarg[2] = p->addr; /* l_long */
+		iarg[3] = p->data; /* l_long */
+		*n_args = 4;
+		break;
+	}
+	/* linux_alarm */
+	case 27: {
+		struct linux_alarm_args *p = params;
+		iarg[0] = p->secs; /* l_uint */
+		*n_args = 1;
+		break;
+	}
+	/* linux_pause */
+	case 29: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_utime */
+	case 30: {
+		struct linux_utime_args *p = params;
+		uarg[0] = (intptr_t) p->fname; /* char * */
+		uarg[1] = (intptr_t) p->times; /* struct l_utimbuf * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_access */
+	case 33: {
+		struct linux_access_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_nice */
+	case 34: {
+		struct linux_nice_args *p = params;
+		iarg[0] = p->inc; /* l_int */
+		*n_args = 1;
+		break;
+	}
+	/* sync */
+	case 36: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_kill */
+	case 37: {
+		struct linux_kill_args *p = params;
+		iarg[0] = p->pid; /* l_int */
+		iarg[1] = p->signum; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_rename */
+	case 38: {
+		struct linux_rename_args *p = params;
+		uarg[0] = (intptr_t) p->from; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_mkdir */
+	case 39: {
+		struct linux_mkdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_rmdir */
+	case 40: {
+		struct linux_rmdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* dup */
+	case 41: {
+		struct dup_args *p = params;
+		uarg[0] = p->fd; /* u_int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_pipe */
+	case 42: {
+		struct linux_pipe_args *p = params;
+		uarg[0] = (intptr_t) p->pipefds; /* l_ulong * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_times */
+	case 43: {
+		struct linux_times_args *p = params;
+		uarg[0] = (intptr_t) p->buf; /* struct l_times_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_brk */
+	case 45: {
+		struct linux_brk_args *p = params;
+		iarg[0] = p->dsend; /* l_ulong */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setgid16 */
+	case 46: {
+		struct linux_setgid16_args *p = params;
+		iarg[0] = p->gid; /* l_gid16_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_getgid16 */
+	case 47: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_signal */
+	case 48: {
+		struct linux_signal_args *p = params;
+		iarg[0] = p->sig; /* l_int */
+		iarg[1] = p->handler; /* l_handler_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_geteuid16 */
+	case 49: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_getegid16 */
+	case 50: {
+		*n_args = 0;
+		break;
+	}
+	/* acct */
+	case 51: {
+		struct acct_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_umount */
+	case 52: {
+		struct linux_umount_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_ioctl */
+	case 54: {
+		struct linux_ioctl_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		iarg[1] = p->cmd; /* l_uint */
+		uarg[2] = p->arg; /* uintptr_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_fcntl */
+	case 55: {
+		struct linux_fcntl_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		iarg[1] = p->cmd; /* l_uint */
+		uarg[2] = p->arg; /* uintptr_t */
+		*n_args = 3;
+		break;
+	}
+	/* setpgid */
+	case 57: {
+		struct setpgid_args *p = params;
+		iarg[0] = p->pid; /* int */
+		iarg[1] = p->pgid; /* int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_olduname */
+	case 59: {
+		*n_args = 0;
+		break;
+	}
+	/* umask */
+	case 60: {
+		struct umask_args *p = params;
+		iarg[0] = p->newmask; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* chroot */
+	case 61: {
+		struct chroot_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_ustat */
+	case 62: {
+		struct linux_ustat_args *p = params;
+		iarg[0] = p->dev; /* l_dev_t */
+		uarg[1] = (intptr_t) p->ubuf; /* struct l_ustat * */
+		*n_args = 2;
+		break;
+	}
+	/* dup2 */
+	case 63: {
+		struct dup2_args *p = params;
+		uarg[0] = p->from; /* u_int */
+		uarg[1] = p->to; /* u_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getppid */
+	case 64: {
+		*n_args = 0;
+		break;
+	}
+	/* getpgrp */
+	case 65: {
+		*n_args = 0;
+		break;
+	}
+	/* setsid */
+	case 66: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_sigaction */
+	case 67: {
+		struct linux_sigaction_args *p = params;
+		iarg[0] = p->sig; /* l_int */
+		uarg[1] = (intptr_t) p->nsa; /* l_osigaction_t * */
+		uarg[2] = (intptr_t) p->osa; /* l_osigaction_t * */
+		*n_args = 3;
+		break;
+	}
+	/* linux_sgetmask */
+	case 68: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_ssetmask */
+	case 69: {
+		struct linux_ssetmask_args *p = params;
+		iarg[0] = p->mask; /* l_osigset_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setreuid16 */
+	case 70: {
+		struct linux_setreuid16_args *p = params;
+		iarg[0] = p->ruid; /* l_uid16_t */
+		iarg[1] = p->euid; /* l_uid16_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setregid16 */
+	case 71: {
+		struct linux_setregid16_args *p = params;
+		iarg[0] = p->rgid; /* l_gid16_t */
+		iarg[1] = p->egid; /* l_gid16_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_sigsuspend */
+	case 72: {
+		struct linux_sigsuspend_args *p = params;
+		iarg[0] = p->hist0; /* l_int */
+		iarg[1] = p->hist1; /* l_int */
+		iarg[2] = p->mask; /* l_osigset_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_sigpending */
+	case 73: {
+		struct linux_sigpending_args *p = params;
+		uarg[0] = (intptr_t) p->mask; /* l_osigset_t * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_sethostname */
+	case 74: {
+		struct linux_sethostname_args *p = params;
+		uarg[0] = (intptr_t) p->hostname; /* char * */
+		uarg[1] = p->len; /* u_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setrlimit */
+	case 75: {
+		struct linux_setrlimit_args *p = params;
+		iarg[0] = p->resource; /* l_uint */
+		uarg[1] = (intptr_t) p->rlim; /* struct l_rlimit * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_old_getrlimit */
+	case 76: {
+		struct linux_old_getrlimit_args *p = params;
+		iarg[0] = p->resource; /* l_uint */
+		uarg[1] = (intptr_t) p->rlim; /* struct l_rlimit * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getrusage */
+	case 77: {
+		struct linux_getrusage_args *p = params;
+		iarg[0] = p->who; /* int */
+		uarg[1] = (intptr_t) p->rusage; /* struct l_rusage * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_gettimeofday */
+	case 78: {
+		struct linux_gettimeofday_args *p = params;
+		uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */
+		uarg[1] = (intptr_t) p->tzp; /* struct timezone * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_settimeofday */
+	case 79: {
+		struct linux_settimeofday_args *p = params;
+		uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */
+		uarg[1] = (intptr_t) p->tzp; /* struct timezone * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getgroups16 */
+	case 80: {
+		struct linux_getgroups16_args *p = params;
+		iarg[0] = p->gidsetsize; /* l_uint */
+		uarg[1] = (intptr_t) p->gidset; /* l_gid16_t * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setgroups16 */
+	case 81: {
+		struct linux_setgroups16_args *p = params;
+		iarg[0] = p->gidsetsize; /* l_uint */
+		uarg[1] = (intptr_t) p->gidset; /* l_gid16_t * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_old_select */
+	case 82: {
+		struct linux_old_select_args *p = params;
+		uarg[0] = (intptr_t) p->ptr; /* struct l_old_select_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_symlink */
+	case 83: {
+		struct linux_symlink_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lstat */
+	case 84: {
+		struct linux_lstat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->up; /* struct linux_lstat * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_readlink */
+	case 85: {
+		struct linux_readlink_args *p = params;
+		uarg[0] = (intptr_t) p->name; /* char * */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		iarg[2] = p->count; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* swapon */
+	case 87: {
+		struct swapon_args *p = params;
+		uarg[0] = (intptr_t) p->name; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_reboot */
+	case 88: {
+		struct linux_reboot_args *p = params;
+		iarg[0] = p->magic1; /* l_int */
+		iarg[1] = p->magic2; /* l_int */
+		iarg[2] = p->cmd; /* l_uint */
+		uarg[3] = (intptr_t) p->arg; /* void * */
+		*n_args = 4;
+		break;
+	}
+	/* linux_readdir */
+	case 89: {
+		struct linux_readdir_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		uarg[1] = (intptr_t) p->dent; /* struct l_dirent * */
+		iarg[2] = p->count; /* l_uint */
+		*n_args = 3;
+		break;
+	}
+	/* linux_mmap */
+	case 90: {
+		struct linux_mmap_args *p = params;
+		uarg[0] = (intptr_t) p->ptr; /* struct l_mmap_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* munmap */
+	case 91: {
+		struct munmap_args *p = params;
+		uarg[0] = (intptr_t) p->addr; /* caddr_t */
+		iarg[1] = p->len; /* int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_truncate */
+	case 92: {
+		struct linux_truncate_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->length; /* l_ulong */
+		*n_args = 2;
+		break;
+	}
+	/* linux_ftruncate */
+	case 93: {
+		struct linux_ftruncate_args *p = params;
+		iarg[0] = p->fd; /* int */
+		iarg[1] = p->length; /* long */
+		*n_args = 2;
+		break;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-03-12 09:09:40 UTC
Author: avg
Date: Sat Mar 12 09:09:25 2011
New Revision: 219561
URL: http://svn.freebsd.org/changeset/base/219561

Log:
  add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  Add systrace_linux32 and systrace_freebsd32 modules which provide
  support for tracing compat system calls in addition to native system
  call tracing provided by systrace module.
  
  Provided that all the systrace modules are loaded now you can select
  what syscalls to trace in the following manner:
  
  syscall::xxx:yyy - work on all system calls that match the specification
  syscall:freebsd:xxx:yyy - only native system calls
  syscall:linux32:xxx:yyy - linux32 compat system calls
  syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64
  
  PR:		kern/152822
  Submitted by:	Artem Belevich <fbsdlist@src.cx>
  Reviewed by:	jhb (earlier version)
  MFC after:	3 weeks

Added:
  head/sys/modules/dtrace/systrace_freebsd32/
  head/sys/modules/dtrace/systrace_freebsd32/Makefile   (contents, props changed)
  head/sys/modules/dtrace/systrace_linux32/
  head/sys/modules/dtrace/systrace_linux32/Makefile   (contents, props changed)
Modified:
  head/sys/cddl/dev/systrace/systrace.c
  head/sys/modules/dtrace/Makefile
  head/sys/modules/dtrace/dtraceall/Makefile
  head/sys/modules/dtrace/dtraceall/dtraceall.c

Modified: head/sys/cddl/dev/systrace/systrace.c
==============================================================================
--- head/sys/cddl/dev/systrace/systrace.c	Sat Mar 12 08:58:19 2011	(r219560)
+++ head/sys/cddl/dev/systrace/systrace.c	Sat Mar 12 09:09:25 2011	(r219561)
@@ -59,17 +59,38 @@
 #include <sys/dtrace.h>
 
 #ifdef LINUX_SYSTRACE
-#include <linux.h>
-#include <linux_syscall.h>
-#include <linux_proto.h>
-#include <linux_syscallnames.c>
-#include <linux_systrace.c>
+#if defined(__amd64__)
+#include <amd64/linux32/linux.h>
+#include <amd64/linux32/linux32_proto.h>
+#include <amd64/linux32/linux32_syscalls.c>
+#include <amd64/linux32/linux32_systrace_args.c>
+#elif defined(__i386__)
+#include <i386/linux/linux.h>
+#include <i386/linux/linux_proto.h>
+#include <i386/linux/linux_syscalls.c>
+#include <i386/linux/linux_systrace_args.c>
+#else
+#error Only i386 and amd64 are supported.
+#endif
 extern struct sysent linux_sysent[];
-#define	DEVNAME		"dtrace/linsystrace"
-#define	PROVNAME	"linsyscall"
+#define	MODNAME		"linux32"
 #define	MAXSYSCALL	LINUX_SYS_MAXSYSCALL
 #define	SYSCALLNAMES	linux_syscallnames
 #define	SYSENT		linux_sysent
+#elif defined(FREEBSD32_SYSTRACE)
+/*
+ * The syscall arguments are processed into a DTrace argument array
+ * using a generated function. See sys/kern/makesyscalls.sh.
+ */
+#include <compat/freebsd32/freebsd32_proto.h>
+#include <compat/freebsd32/freebsd32_util.h>
+#include <compat/freebsd32/freebsd32_syscall.h>
+#include <compat/freebsd32/freebsd32_systrace_args.c>
+extern const char *freebsd32_syscallnames[];
+#define	MODNAME		"freebsd32"
+#define	MAXSYSCALL	FREEBSD32_SYS_MAXSYSCALL
+#define	SYSCALLNAMES	freebsd32_syscallnames
+#define	SYSENT		freebsd32_sysent
 #else
 /*
  * The syscall arguments are processed into a DTrace argument array
@@ -77,13 +98,15 @@ extern struct sysent linux_sysent[];
  */
 #include <sys/syscall.h>
 #include <kern/systrace_args.c>
-#define	DEVNAME		"dtrace/systrace"
-#define	PROVNAME	"syscall"
+#define	MODNAME		"freebsd"
 #define	MAXSYSCALL	SYS_MAXSYSCALL
 #define	SYSCALLNAMES	syscallnames
 #define	SYSENT		sysent
 #endif
 
+#define	PROVNAME	"syscall"
+#define	DEVNAME	        "dtrace/systrace/" MODNAME
+
 #define	SYSTRACE_ARTIFICIAL_FRAMES	1
 
 #define	SYSTRACE_SHIFT			16
@@ -214,14 +237,14 @@ systrace_provide(void *arg, dtrace_probe
 		return;
 
 	for (i = 0; i < MAXSYSCALL; i++) {
-		if (dtrace_probe_lookup(systrace_id, NULL,
+		if (dtrace_probe_lookup(systrace_id, MODNAME,
 		    uglyhack.pp_syscallnames[i], "entry") != 0)
 			continue;
 
-		(void) dtrace_probe_create(systrace_id, NULL, uglyhack.pp_syscallnames[i],
+		(void) dtrace_probe_create(systrace_id, MODNAME, uglyhack.pp_syscallnames[i],
 		    "entry", SYSTRACE_ARTIFICIAL_FRAMES,
 		    (void *)((uintptr_t)SYSTRACE_ENTRY(i)));
-		(void) dtrace_probe_create(systrace_id, NULL, uglyhack.pp_syscallnames[i],
+		(void) dtrace_probe_create(systrace_id, MODNAME, uglyhack.pp_syscallnames[i],
 		    "return", SYSTRACE_ARTIFICIAL_FRAMES,
 		    (void *)((uintptr_t)SYSTRACE_RETURN(i)));
 	}
@@ -335,12 +358,16 @@ SYSINIT(systrace_load, SI_SUB_DTRACE_PRO
 SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL);
 
 #ifdef LINUX_SYSTRACE
-DEV_MODULE(linsystrace, systrace_modevent, NULL);
-MODULE_VERSION(linsystrace, 1);
-MODULE_DEPEND(linsystrace, linux, 1, 1, 1);
-MODULE_DEPEND(linsystrace, systrace, 1, 1, 1);
-MODULE_DEPEND(linsystrace, dtrace, 1, 1, 1);
-MODULE_DEPEND(linsystrace, opensolaris, 1, 1, 1);
+DEV_MODULE(systrace_linux32, systrace_modevent, NULL);
+MODULE_VERSION(systrace_linux32, 1);
+MODULE_DEPEND(systrace_linux32, linux, 1, 1, 1);
+MODULE_DEPEND(systrace_linux32, dtrace, 1, 1, 1);
+MODULE_DEPEND(systrace_linux32, opensolaris, 1, 1, 1);
+#elif defined(FREEBSD32_SYSTRACE)
+DEV_MODULE(systrace_freebsd32, systrace_modevent, NULL);
+MODULE_VERSION(systrace_freebsd32, 1);
+MODULE_DEPEND(systrace_freebsd32, dtrace, 1, 1, 1);
+MODULE_DEPEND(systrace_freebsd32, opensolaris, 1, 1, 1);
 #else
 DEV_MODULE(systrace, systrace_modevent, NULL);
 MODULE_VERSION(systrace, 1);

Modified: head/sys/modules/dtrace/Makefile
==============================================================================
--- head/sys/modules/dtrace/Makefile	Sat Mar 12 08:58:19 2011	(r219560)
+++ head/sys/modules/dtrace/Makefile	Sat Mar 12 09:09:25 2011	(r219561)
@@ -15,7 +15,10 @@ SUBDIR=		dtmalloc	\
 		systrace
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
-SUBDIR+=	fasttrap fbt
+SUBDIR+=	fasttrap fbt systrace_linux32
+.endif
+.if ${MACHINE_CPUARCH} == "amd64"
+SUBDIR+=	systrace_freebsd32
 .endif
 
 .include <bsd.subdir.mk>

Modified: head/sys/modules/dtrace/dtraceall/Makefile
==============================================================================
--- head/sys/modules/dtrace/dtraceall/Makefile	Sat Mar 12 08:58:19 2011	(r219560)
+++ head/sys/modules/dtrace/dtraceall/Makefile	Sat Mar 12 09:09:25 2011	(r219561)
@@ -1,8 +1,15 @@
 # $FreeBSD$
 
 KMOD=		dtraceall
-SRCS=		dtraceall.c
+SRCS=		dtraceall.c opt_compat.h
 
 CFLAGS+=	-I${.CURDIR}/../../..
 
+.if !defined(KERNBUILDDIR)
+opt_compat.h:
+.if ${MACHINE_ARCH} == "amd64"
+	echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET}
+.endif
+.endif
+
 .include <bsd.kmod.mk>

Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c
==============================================================================
--- head/sys/modules/dtrace/dtraceall/dtraceall.c	Sat Mar 12 08:58:19 2011	(r219560)
+++ head/sys/modules/dtrace/dtraceall/dtraceall.c	Sat Mar 12 09:09:25 2011	(r219561)
@@ -32,6 +32,7 @@
 #include <sys/kernel.h>
 #include <sys/module.h>
 #include <sys/errno.h>
+#include "opt_compat.h"
 
 static int
 dtraceall_modevent(module_t mod __unused, int type, void *data __unused)
@@ -73,4 +74,7 @@ MODULE_DEPEND(dtraceall, fasttrap, 1, 1,
 MODULE_DEPEND(dtraceall, lockstat, 1, 1, 1);
 MODULE_DEPEND(dtraceall, sdt, 1, 1, 1);
 MODULE_DEPEND(dtraceall, systrace, 1, 1, 1);
+#if defined(COMPAT_FREEBSD32)
+MODULE_DEPEND(dtraceall, systrace_freebsd32, 1, 1, 1);
+#endif
 MODULE_DEPEND(dtraceall, profile, 1, 1, 1);

Added: head/sys/modules/dtrace/systrace_freebsd32/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/dtrace/systrace_freebsd32/Makefile	Sat Mar 12 09:09:25 2011	(r219561)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/dev/systrace
+
+KMOD=		systrace_freebsd32
+SRCS=		systrace.c
+SRCS+=		vnode_if.h
+
+CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
+		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
+		-I${.CURDIR}/../../.. -DFREEBSD32_SYSTRACE
+
+.include <bsd.kmod.mk>

Added: head/sys/modules/dtrace/systrace_linux32/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/dtrace/systrace_linux32/Makefile	Sat Mar 12 09:09:25 2011	(r219561)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../../cddl/dev/systrace
+
+KMOD=		systrace_linux32
+SRCS=		systrace.c
+SRCS+=		vnode_if.h
+
+CFLAGS+=	-I${.CURDIR}/../../../cddl/compat/opensolaris \
+		-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \
+		-I${.CURDIR}/../../.. -DLINUX_SYSTRACE
+
+.include <bsd.kmod.mk>
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 Andriy Gapon freebsd_committer freebsd_triage 2011-03-12 11:07:20 UTC
State Changed
From-To: open->patched

The code is added to head.
Comment 6 Andriy Gapon freebsd_committer freebsd_triage 2011-05-31 16:27:14 UTC
Responsible Changed
From-To: avg->art

Artem now has a commit bit and he is planning on doing MFC 
of the committed code.
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-06-01 06:50:37 UTC
Author: art
Date: Wed Jun  1 05:50:24 2011
New Revision: 222555
URL: http://svn.freebsd.org/changeset/base/222555

Log:
  MFC r219559:
  
  add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  This commits makes necessary changes in syscall/sysent generation
  infrastructure.
  
  PR:         kern/152822
  Reviewed by:        jhb (ealier version)
  Approved by:	avg (mentor)

Modified:
  stable/8/sys/amd64/linux32/Makefile
  stable/8/sys/amd64/linux32/syscalls.conf
  stable/8/sys/amd64/linux32/syscalls.master
  stable/8/sys/compat/freebsd32/Makefile
  stable/8/sys/compat/freebsd32/syscalls.conf
  stable/8/sys/i386/linux/Makefile
  stable/8/sys/i386/linux/syscalls.conf
  stable/8/sys/i386/linux/syscalls.master
  stable/8/sys/kern/makesyscalls.sh

Modified: stable/8/sys/amd64/linux32/Makefile
==============================================================================
--- stable/8/sys/amd64/linux32/Makefile	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/amd64/linux32/Makefile	Wed Jun  1 05:50:24 2011	(r222555)
@@ -5,11 +5,13 @@
 all:
 	@echo "make sysent only"
 
-sysent:  linux32_sysent.c linux32_syscall.h linux32_proto.h
+sysent:  linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c
 
-linux32_sysent.c linux32_syscall.h linux32_proto.h: ../../kern/makesyscalls.sh \
+linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \
 		syscalls.master syscalls.conf
 	-mv -f linux32_sysent.c linux32_sysent.c.bak
 	-mv -f linux32_syscall.h linux32_syscall.h.bak
 	-mv -f linux32_proto.h linux32_proto.h.bak
+	-mv -f linux32_syscalls.c linux32_syscalls.c.bak
+	-mv -f linux32_systrace_args.c linux32_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

Modified: stable/8/sys/amd64/linux32/syscalls.conf
==============================================================================
--- stable/8/sys/amd64/linux32/syscalls.conf	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/amd64/linux32/syscalls.conf	Wed Jun  1 05:50:24 2011	(r222555)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-sysnames="/dev/null"
+sysnames="linux32_syscalls.c"
 sysproto="linux32_proto.h"
 sysproto_h=_LINUX_SYSPROTO_H_
 syshdr="linux32_syscall.h"
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="LINUX_SYS_"
 switchname="linux_sysent"
 namesname="linux_syscallnames"
-systrace="/dev/null"
+systrace="linux32_systrace_args.c"

Modified: stable/8/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/8/sys/amd64/linux32/syscalls.master	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/amd64/linux32/syscalls.master	Wed Jun  1 05:50:24 2011	(r222555)
@@ -291,7 +291,7 @@
 				    l_uid16_t *euid, l_uid16_t *suid); }
 166	AUE_NULL	UNIMPL	vm86
 167	AUE_NULL	STD	{ int linux_query_module(void); }
-168	AUE_POLL	NOPROTO	{ int poll(struct pollfd*, \
+168	AUE_POLL	NOPROTO	{ int poll(struct pollfd *fds, \
 				    unsigned int nfds, int timeout); }
 169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \

Modified: stable/8/sys/compat/freebsd32/Makefile
==============================================================================
--- stable/8/sys/compat/freebsd32/Makefile	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/compat/freebsd32/Makefile	Wed Jun  1 05:50:24 2011	(r222555)
@@ -5,15 +5,17 @@
 all:
 	@echo "make sysent only"
 
-sysent:  freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h
+sysent:  freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c
 
-freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h: \
+freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \
 	    ../../kern/makesyscalls.sh syscalls.master syscalls.conf
 	-mv -f freebsd32_sysent.c freebsd32_sysent.c.bak
 	-mv -f freebsd32_syscalls.c freebsd32_syscalls.c.bak
 	-mv -f freebsd32_syscall.h freebsd32_syscall.h.bak
 	-mv -f freebsd32_proto.h freebsd32_proto.h.bak
+	-mv -f freebsd32_systrace_args.c  freebsd32_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf
 
 clean:
 	rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h
+	rm -f freebsd32_systrace_args.c 

Modified: stable/8/sys/compat/freebsd32/syscalls.conf
==============================================================================
--- stable/8/sys/compat/freebsd32/syscalls.conf	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/compat/freebsd32/syscalls.conf	Wed Jun  1 05:50:24 2011	(r222555)
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="FREEBSD32_SYS_"
 switchname="freebsd32_sysent"
 namesname="freebsd32_syscallnames"
-systrace="/dev/null"
+systrace="freebsd32_systrace_args.c"

Modified: stable/8/sys/i386/linux/Makefile
==============================================================================
--- stable/8/sys/i386/linux/Makefile	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/i386/linux/Makefile	Wed Jun  1 05:50:24 2011	(r222555)
@@ -5,11 +5,13 @@
 all:
 	@echo "make sysent only"
 
-sysent:  linux_sysent.c linux_syscall.h linux_proto.h
+sysent:  linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c
 
-linux_sysent.c linux_syscall.h linux_proto.h: ../../kern/makesyscalls.sh \
-		syscalls.master syscalls.conf
+linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \
+		../../kern/makesyscalls.sh syscalls.master syscalls.conf
 	-mv -f linux_sysent.c linux_sysent.c.bak
 	-mv -f linux_syscall.h linux_syscall.h.bak
 	-mv -f linux_proto.h linux_proto.h.bak
+	-mv -f linux_syscalls.c linux_syscalls.c.bak
+	-mv -f linux_systrace_args.c linux_systrace_args.c.bak
 	sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf

Modified: stable/8/sys/i386/linux/syscalls.conf
==============================================================================
--- stable/8/sys/i386/linux/syscalls.conf	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/i386/linux/syscalls.conf	Wed Jun  1 05:50:24 2011	(r222555)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-sysnames="/dev/null"
+sysnames="linux_syscalls.c"
 sysproto="linux_proto.h"
 sysproto_h=_LINUX_SYSPROTO_H_
 syshdr="linux_syscall.h"
@@ -8,4 +8,4 @@ sysmk="/dev/null"
 syscallprefix="LINUX_SYS_"
 switchname="linux_sysent"
 namesname="linux_syscallnames"
-systrace="/dev/null"
+systrace="linux_systrace_args.c"

Modified: stable/8/sys/i386/linux/syscalls.master
==============================================================================
--- stable/8/sys/i386/linux/syscalls.master	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/i386/linux/syscalls.master	Wed Jun  1 05:50:24 2011	(r222555)
@@ -102,7 +102,7 @@
 46	AUE_SETGID	STD	{ int linux_setgid16(l_gid16_t gid); }
 47	AUE_GETGID	STD	{ int linux_getgid16(void); }
 48	AUE_NULL	STD	{ int linux_signal(l_int sig, \
-				    l_handler_t handler); }
+				    void *handler); }
 49	AUE_GETEUID	STD	{ int linux_geteuid16(void); }
 50	AUE_GETEGID	STD	{ int linux_getegid16(void); }
 51	AUE_ACCT	NOPROTO	{ int acct(char *path); }
@@ -148,7 +148,7 @@
 				    struct timeval *tp, \
 				    struct timezone *tzp); }
 79	AUE_SETTIMEOFDAY	NOPROTO	{ int settimeofday( \
-				    struct timeval *tp, \
+				    struct timeval *tv, \
 				    struct timezone *tzp); }
 80	AUE_GETGROUPS	STD	{ int linux_getgroups16(l_uint gidsetsize, \
 				    l_gid16_t *gidset); }
@@ -293,7 +293,7 @@
 				    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); }
-168	AUE_POLL	NOPROTO	{ int poll(struct pollfd*, \
+168	AUE_POLL	NOPROTO	{ int poll(struct pollfd* fds, \
 				    unsigned int nfds, long timeout); }
 169	AUE_NULL	STD	{ int linux_nfsservctl(void); }
 170	AUE_SETRESGID	STD	{ int linux_setresgid16(l_gid16_t rgid, \

Modified: stable/8/sys/kern/makesyscalls.sh
==============================================================================
--- stable/8/sys/kern/makesyscalls.sh	Wed Jun  1 05:03:17 2011	(r222554)
+++ stable/8/sys/kern/makesyscalls.sh	Wed Jun  1 05:50:24 2011	(r222555)
@@ -190,6 +190,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		savesyscall = syscall
 		next
 	}
@@ -202,6 +204,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		syscall = savesyscall
 		next
 	}
@@ -214,6 +218,8 @@ s/\$//g
 		print > syscompat6
 		print > syscompat7
 		print > sysnames
+		print > systrace
+		print > systracetmp
 		next
 	}
 	syscall != $1 {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2011-06-01 07:01:39 UTC
Author: art
Date: Wed Jun  1 06:01:17 2011
New Revision: 222556
URL: http://svn.freebsd.org/changeset/base/222556

Log:
  Added DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  Regenerates system call and systrace support files.
  
  PR:         kern/152822
  Reviewed by:        jhb (earlier version)
  Approved by:	avg (mentor)

Added:
  stable/8/sys/amd64/linux32/linux32_syscalls.c   (contents, props changed)
  stable/8/sys/amd64/linux32/linux32_systrace_args.c   (contents, props changed)
  stable/8/sys/compat/freebsd32/freebsd32_systrace_args.c   (contents, props changed)
  stable/8/sys/i386/linux/linux_syscalls.c   (contents, props changed)
  stable/8/sys/i386/linux/linux_systrace_args.c   (contents, props changed)
Modified:
  stable/8/sys/amd64/linux32/linux32_proto.h
  stable/8/sys/amd64/linux32/linux32_syscall.h
  stable/8/sys/amd64/linux32/linux32_sysent.c
  stable/8/sys/i386/linux/linux_proto.h
  stable/8/sys/i386/linux/linux_syscall.h
  stable/8/sys/i386/linux/linux_sysent.c

Modified: stable/8/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- stable/8/sys/amd64/linux32/linux32_proto.h	Wed Jun  1 05:50:24 2011	(r222555)
+++ stable/8/sys/amd64/linux32/linux32_proto.h	Wed Jun  1 06:01:17 2011	(r222556)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 220466 2011-04-09 08:29:07Z avg 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 2011-06-01 05:50:24Z art 
  */
 
 #ifndef _LINUX_SYSPROTO_H_

Modified: stable/8/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- stable/8/sys/amd64/linux32/linux32_syscall.h	Wed Jun  1 05:50:24 2011	(r222555)
+++ stable/8/sys/amd64/linux32/linux32_syscall.h	Wed Jun  1 06:01:17 2011	(r222556)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 220466 2011-04-09 08:29:07Z avg 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 2011-06-01 05:50:24Z art 
  */
 
 #define	LINUX_SYS_exit	1

Added: stable/8/sys/amd64/linux32/linux32_syscalls.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/amd64/linux32/linux32_syscalls.c	Wed Jun  1 06:01:17 2011	(r222556)
@@ -0,0 +1,328 @@
+/*
+ * System call names.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 2011-06-01 05:50:24Z art 
+ */
+
+const char *linux_syscallnames[] = {
+#define	nosys	linux_nosys
+	"#0",			/* 0 = setup */
+	"exit",			/* 1 = exit */
+	"linux_fork",			/* 2 = linux_fork */
+	"read",			/* 3 = read */
+	"write",			/* 4 = write */
+	"linux_open",			/* 5 = linux_open */
+	"close",			/* 6 = close */
+	"linux_waitpid",			/* 7 = linux_waitpid */
+	"linux_creat",			/* 8 = linux_creat */
+	"linux_link",			/* 9 = linux_link */
+	"linux_unlink",			/* 10 = linux_unlink */
+	"linux_execve",			/* 11 = linux_execve */
+	"linux_chdir",			/* 12 = linux_chdir */
+	"linux_time",			/* 13 = linux_time */
+	"linux_mknod",			/* 14 = linux_mknod */
+	"linux_chmod",			/* 15 = linux_chmod */
+	"linux_lchown16",			/* 16 = linux_lchown16 */
+	"#17",			/* 17 = break */
+	"linux_stat",			/* 18 = linux_stat */
+	"linux_lseek",			/* 19 = linux_lseek */
+	"linux_getpid",			/* 20 = linux_getpid */
+	"linux_mount",			/* 21 = linux_mount */
+	"linux_oldumount",			/* 22 = linux_oldumount */
+	"linux_setuid16",			/* 23 = linux_setuid16 */
+	"linux_getuid16",			/* 24 = linux_getuid16 */
+	"linux_stime",			/* 25 = linux_stime */
+	"linux_ptrace",			/* 26 = linux_ptrace */
+	"linux_alarm",			/* 27 = linux_alarm */
+	"#28",			/* 28 = fstat */
+	"linux_pause",			/* 29 = linux_pause */
+	"linux_utime",			/* 30 = linux_utime */
+	"#31",			/* 31 = stty */
+	"#32",			/* 32 = gtty */
+	"linux_access",			/* 33 = linux_access */
+	"linux_nice",			/* 34 = linux_nice */
+	"#35",			/* 35 = ftime */
+	"sync",			/* 36 = sync */
+	"linux_kill",			/* 37 = linux_kill */
+	"linux_rename",			/* 38 = linux_rename */
+	"linux_mkdir",			/* 39 = linux_mkdir */
+	"linux_rmdir",			/* 40 = linux_rmdir */
+	"dup",			/* 41 = dup */
+	"linux_pipe",			/* 42 = linux_pipe */
+	"linux_times",			/* 43 = linux_times */
+	"#44",			/* 44 = prof */
+	"linux_brk",			/* 45 = linux_brk */
+	"linux_setgid16",			/* 46 = linux_setgid16 */
+	"linux_getgid16",			/* 47 = linux_getgid16 */
+	"linux_signal",			/* 48 = linux_signal */
+	"linux_geteuid16",			/* 49 = linux_geteuid16 */
+	"linux_getegid16",			/* 50 = linux_getegid16 */
+	"acct",			/* 51 = acct */
+	"linux_umount",			/* 52 = linux_umount */
+	"#53",			/* 53 = lock */
+	"linux_ioctl",			/* 54 = linux_ioctl */
+	"linux_fcntl",			/* 55 = linux_fcntl */
+	"#56",			/* 56 = mpx */
+	"setpgid",			/* 57 = setpgid */
+	"#58",			/* 58 = ulimit */
+	"linux_olduname",			/* 59 = linux_olduname */
+	"umask",			/* 60 = umask */
+	"chroot",			/* 61 = chroot */
+	"linux_ustat",			/* 62 = linux_ustat */
+	"dup2",			/* 63 = dup2 */
+	"linux_getppid",			/* 64 = linux_getppid */
+	"getpgrp",			/* 65 = getpgrp */
+	"setsid",			/* 66 = setsid */
+	"linux_sigaction",			/* 67 = linux_sigaction */
+	"linux_sgetmask",			/* 68 = linux_sgetmask */
+	"linux_ssetmask",			/* 69 = linux_ssetmask */
+	"linux_setreuid16",			/* 70 = linux_setreuid16 */
+	"linux_setregid16",			/* 71 = linux_setregid16 */
+	"linux_sigsuspend",			/* 72 = linux_sigsuspend */
+	"linux_sigpending",			/* 73 = linux_sigpending */
+	"linux_sethostname",			/* 74 = linux_sethostname */
+	"linux_setrlimit",			/* 75 = linux_setrlimit */
+	"linux_old_getrlimit",			/* 76 = linux_old_getrlimit */
+	"linux_getrusage",			/* 77 = linux_getrusage */
+	"linux_gettimeofday",			/* 78 = linux_gettimeofday */
+	"linux_settimeofday",			/* 79 = linux_settimeofday */
+	"linux_getgroups16",			/* 80 = linux_getgroups16 */
+	"linux_setgroups16",			/* 81 = linux_setgroups16 */
+	"linux_old_select",			/* 82 = linux_old_select */
+	"linux_symlink",			/* 83 = linux_symlink */
+	"linux_lstat",			/* 84 = linux_lstat */
+	"linux_readlink",			/* 85 = linux_readlink */
+	"#86",			/* 86 = linux_uselib */
+	"swapon",			/* 87 = swapon */
+	"linux_reboot",			/* 88 = linux_reboot */
+	"linux_readdir",			/* 89 = linux_readdir */
+	"linux_mmap",			/* 90 = linux_mmap */
+	"munmap",			/* 91 = munmap */
+	"linux_truncate",			/* 92 = linux_truncate */
+	"linux_ftruncate",			/* 93 = linux_ftruncate */
+	"fchmod",			/* 94 = fchmod */
+	"fchown",			/* 95 = fchown */
+	"linux_getpriority",			/* 96 = linux_getpriority */
+	"setpriority",			/* 97 = setpriority */
+	"#98",			/* 98 = profil */
+	"linux_statfs",			/* 99 = linux_statfs */
+	"linux_fstatfs",			/* 100 = linux_fstatfs */
+	"#101",			/* 101 = ioperm */
+	"linux_socketcall",			/* 102 = linux_socketcall */
+	"linux_syslog",			/* 103 = linux_syslog */
+	"linux_setitimer",			/* 104 = linux_setitimer */
+	"linux_getitimer",			/* 105 = linux_getitimer */
+	"linux_newstat",			/* 106 = linux_newstat */
+	"linux_newlstat",			/* 107 = linux_newlstat */
+	"linux_newfstat",			/* 108 = linux_newfstat */
+	"linux_uname",			/* 109 = linux_uname */
+	"linux_iopl",			/* 110 = linux_iopl */
+	"linux_vhangup",			/* 111 = linux_vhangup */
+	"#112",			/* 112 = idle */
+	"#113",			/* 113 = vm86old */
+	"linux_wait4",			/* 114 = linux_wait4 */
+	"linux_swapoff",			/* 115 = linux_swapoff */
+	"linux_sysinfo",			/* 116 = linux_sysinfo */
+	"linux_ipc",			/* 117 = linux_ipc */
+	"fsync",			/* 118 = fsync */
+	"linux_sigreturn",			/* 119 = linux_sigreturn */
+	"linux_clone",			/* 120 = linux_clone */
+	"linux_setdomainname",			/* 121 = linux_setdomainname */
+	"linux_newuname",			/* 122 = linux_newuname */
+	"#123",			/* 123 = modify_ldt */
+	"linux_adjtimex",			/* 124 = linux_adjtimex */
+	"linux_mprotect",			/* 125 = linux_mprotect */
+	"linux_sigprocmask",			/* 126 = linux_sigprocmask */
+	"linux_create_module",			/* 127 = linux_create_module */
+	"linux_init_module",			/* 128 = linux_init_module */
+	"linux_delete_module",			/* 129 = linux_delete_module */
+	"linux_get_kernel_syms",			/* 130 = linux_get_kernel_syms */
+	"linux_quotactl",			/* 131 = linux_quotactl */
+	"getpgid",			/* 132 = getpgid */
+	"fchdir",			/* 133 = fchdir */
+	"linux_bdflush",			/* 134 = linux_bdflush */
+	"linux_sysfs",			/* 135 = linux_sysfs */
+	"linux_personality",			/* 136 = linux_personality */
+	"#137",			/* 137 = afs_syscall */
+	"linux_setfsuid16",			/* 138 = linux_setfsuid16 */
+	"linux_setfsgid16",			/* 139 = linux_setfsgid16 */
+	"linux_llseek",			/* 140 = linux_llseek */
+	"linux_getdents",			/* 141 = linux_getdents */
+	"linux_select",			/* 142 = linux_select */
+	"flock",			/* 143 = flock */
+	"linux_msync",			/* 144 = linux_msync */
+	"linux_readv",			/* 145 = linux_readv */
+	"linux_writev",			/* 146 = linux_writev */
+	"linux_getsid",			/* 147 = linux_getsid */
+	"linux_fdatasync",			/* 148 = linux_fdatasync */
+	"linux_sysctl",			/* 149 = linux_sysctl */
+	"mlock",			/* 150 = mlock */
+	"munlock",			/* 151 = munlock */
+	"mlockall",			/* 152 = mlockall */
+	"munlockall",			/* 153 = munlockall */
+	"sched_setparam",			/* 154 = sched_setparam */
+	"sched_getparam",			/* 155 = sched_getparam */
+	"linux_sched_setscheduler",			/* 156 = linux_sched_setscheduler */
+	"linux_sched_getscheduler",			/* 157 = linux_sched_getscheduler */
+	"sched_yield",			/* 158 = sched_yield */
+	"linux_sched_get_priority_max",			/* 159 = linux_sched_get_priority_max */
+	"linux_sched_get_priority_min",			/* 160 = linux_sched_get_priority_min */
+	"linux_sched_rr_get_interval",			/* 161 = linux_sched_rr_get_interval */
+	"linux_nanosleep",			/* 162 = linux_nanosleep */
+	"linux_mremap",			/* 163 = linux_mremap */
+	"linux_setresuid16",			/* 164 = linux_setresuid16 */
+	"linux_getresuid16",			/* 165 = linux_getresuid16 */
+	"#166",			/* 166 = vm86 */
+	"linux_query_module",			/* 167 = linux_query_module */
+	"poll",			/* 168 = poll */
+	"linux_nfsservctl",			/* 169 = linux_nfsservctl */
+	"linux_setresgid16",			/* 170 = linux_setresgid16 */
+	"linux_getresgid16",			/* 171 = linux_getresgid16 */
+	"linux_prctl",			/* 172 = linux_prctl */
+	"linux_rt_sigreturn",			/* 173 = linux_rt_sigreturn */
+	"linux_rt_sigaction",			/* 174 = linux_rt_sigaction */
+	"linux_rt_sigprocmask",			/* 175 = linux_rt_sigprocmask */
+	"linux_rt_sigpending",			/* 176 = linux_rt_sigpending */
+	"linux_rt_sigtimedwait",			/* 177 = linux_rt_sigtimedwait */
+	"linux_rt_sigqueueinfo",			/* 178 = linux_rt_sigqueueinfo */
+	"linux_rt_sigsuspend",			/* 179 = linux_rt_sigsuspend */
+	"linux_pread",			/* 180 = linux_pread */
+	"linux_pwrite",			/* 181 = linux_pwrite */
+	"linux_chown16",			/* 182 = linux_chown16 */
+	"linux_getcwd",			/* 183 = linux_getcwd */
+	"linux_capget",			/* 184 = linux_capget */
+	"linux_capset",			/* 185 = linux_capset */
+	"linux_sigaltstack",			/* 186 = linux_sigaltstack */
+	"linux_sendfile",			/* 187 = linux_sendfile */
+	"#188",			/* 188 = getpmsg */
+	"#189",			/* 189 = putpmsg */
+	"linux_vfork",			/* 190 = linux_vfork */
+	"linux_getrlimit",			/* 191 = linux_getrlimit */
+	"linux_mmap2",			/* 192 = linux_mmap2 */
+	"linux_truncate64",			/* 193 = linux_truncate64 */
+	"linux_ftruncate64",			/* 194 = linux_ftruncate64 */
+	"linux_stat64",			/* 195 = linux_stat64 */
+	"linux_lstat64",			/* 196 = linux_lstat64 */
+	"linux_fstat64",			/* 197 = linux_fstat64 */
+	"linux_lchown",			/* 198 = linux_lchown */
+	"linux_getuid",			/* 199 = linux_getuid */
+	"linux_getgid",			/* 200 = linux_getgid */
+	"geteuid",			/* 201 = geteuid */
+	"getegid",			/* 202 = getegid */
+	"setreuid",			/* 203 = setreuid */
+	"setregid",			/* 204 = setregid */
+	"linux_getgroups",			/* 205 = linux_getgroups */
+	"linux_setgroups",			/* 206 = linux_setgroups */
+	"fchown",			/* 207 = fchown */
+	"setresuid",			/* 208 = setresuid */
+	"getresuid",			/* 209 = getresuid */
+	"setresgid",			/* 210 = setresgid */
+	"getresgid",			/* 211 = getresgid */
+	"linux_chown",			/* 212 = linux_chown */
+	"setuid",			/* 213 = setuid */
+	"setgid",			/* 214 = setgid */
+	"linux_setfsuid",			/* 215 = linux_setfsuid */
+	"linux_setfsgid",			/* 216 = linux_setfsgid */
+	"linux_pivot_root",			/* 217 = linux_pivot_root */
+	"linux_mincore",			/* 218 = linux_mincore */
+	"madvise",			/* 219 = madvise */
+	"linux_getdents64",			/* 220 = linux_getdents64 */
+	"linux_fcntl64",			/* 221 = linux_fcntl64 */
+	"#222",			/* 222 =  */
+	"#223",			/* 223 =  */
+	"linux_gettid",			/* 224 = linux_gettid */
+	"#225",			/* 225 = linux_readahead */
+	"linux_setxattr",			/* 226 = linux_setxattr */
+	"linux_lsetxattr",			/* 227 = linux_lsetxattr */
+	"linux_fsetxattr",			/* 228 = linux_fsetxattr */
+	"linux_getxattr",			/* 229 = linux_getxattr */
+	"linux_lgetxattr",			/* 230 = linux_lgetxattr */
+	"linux_fgetxattr",			/* 231 = linux_fgetxattr */
+	"linux_listxattr",			/* 232 = linux_listxattr */
+	"linux_llistxattr",			/* 233 = linux_llistxattr */
+	"linux_flistxattr",			/* 234 = linux_flistxattr */
+	"linux_removexattr",			/* 235 = linux_removexattr */
+	"linux_lremovexattr",			/* 236 = linux_lremovexattr */
+	"linux_fremovexattr",			/* 237 = linux_fremovexattr */
+	"linux_tkill",			/* 238 = linux_tkill */
+	"#239",			/* 239 = linux_sendfile64 */
+	"linux_sys_futex",			/* 240 = linux_sys_futex */
+	"linux_sched_setaffinity",			/* 241 = linux_sched_setaffinity */
+	"linux_sched_getaffinity",			/* 242 = linux_sched_getaffinity */
+	"linux_set_thread_area",			/* 243 = linux_set_thread_area */
+	"#244",			/* 244 = linux_get_thread_area */
+	"#245",			/* 245 = linux_io_setup */
+	"#246",			/* 246 = linux_io_destroy */
+	"#247",			/* 247 = linux_io_getevents */
+	"#248",			/* 248 = linux_io_submit */
+	"#249",			/* 249 = linux_io_cancel */
+	"linux_fadvise64",			/* 250 = linux_fadvise64 */
+	"#251",			/* 251 =  */
+	"linux_exit_group",			/* 252 = linux_exit_group */
+	"linux_lookup_dcookie",			/* 253 = linux_lookup_dcookie */
+	"linux_epoll_create",			/* 254 = linux_epoll_create */
+	"linux_epoll_ctl",			/* 255 = linux_epoll_ctl */
+	"linux_epoll_wait",			/* 256 = linux_epoll_wait */
+	"linux_remap_file_pages",			/* 257 = linux_remap_file_pages */
+	"linux_set_tid_address",			/* 258 = linux_set_tid_address */
+	"linux_timer_create",			/* 259 = linux_timer_create */
+	"linux_timer_settime",			/* 260 = linux_timer_settime */
+	"linux_timer_gettime",			/* 261 = linux_timer_gettime */
+	"linux_timer_getoverrun",			/* 262 = linux_timer_getoverrun */
+	"linux_timer_delete",			/* 263 = linux_timer_delete */
+	"linux_clock_settime",			/* 264 = linux_clock_settime */
+	"linux_clock_gettime",			/* 265 = linux_clock_gettime */
+	"linux_clock_getres",			/* 266 = linux_clock_getres */
+	"linux_clock_nanosleep",			/* 267 = linux_clock_nanosleep */
+	"linux_statfs64",			/* 268 = linux_statfs64 */
+	"linux_fstatfs64",			/* 269 = linux_fstatfs64 */
+	"linux_tgkill",			/* 270 = linux_tgkill */
+	"linux_utimes",			/* 271 = linux_utimes */
+	"linux_fadvise64_64",			/* 272 = linux_fadvise64_64 */
+	"#273",			/* 273 =  */
+	"linux_mbind",			/* 274 = linux_mbind */
+	"linux_get_mempolicy",			/* 275 = linux_get_mempolicy */
+	"linux_set_mempolicy",			/* 276 = linux_set_mempolicy */
+	"linux_mq_open",			/* 277 = linux_mq_open */
+	"linux_mq_unlink",			/* 278 = linux_mq_unlink */
+	"linux_mq_timedsend",			/* 279 = linux_mq_timedsend */
+	"linux_mq_timedreceive",			/* 280 = linux_mq_timedreceive */
+	"linux_mq_notify",			/* 281 = linux_mq_notify */
+	"linux_mq_getsetattr",			/* 282 = linux_mq_getsetattr */
+	"linux_kexec_load",			/* 283 = linux_kexec_load */
+	"linux_waitid",			/* 284 = linux_waitid */
+	"#285",			/* 285 =  */
+	"linux_add_key",			/* 286 = linux_add_key */
+	"linux_request_key",			/* 287 = linux_request_key */
+	"linux_keyctl",			/* 288 = linux_keyctl */
+	"linux_ioprio_set",			/* 289 = linux_ioprio_set */
+	"linux_ioprio_get",			/* 290 = linux_ioprio_get */
+	"linux_inotify_init",			/* 291 = linux_inotify_init */
+	"linux_inotify_add_watch",			/* 292 = linux_inotify_add_watch */
+	"linux_inotify_rm_watch",			/* 293 = linux_inotify_rm_watch */
+	"linux_migrate_pages",			/* 294 = linux_migrate_pages */
+	"linux_openat",			/* 295 = linux_openat */
+	"linux_mkdirat",			/* 296 = linux_mkdirat */
+	"linux_mknodat",			/* 297 = linux_mknodat */
+	"linux_fchownat",			/* 298 = linux_fchownat */
+	"linux_futimesat",			/* 299 = linux_futimesat */
+	"linux_fstatat64",			/* 300 = linux_fstatat64 */
+	"linux_unlinkat",			/* 301 = linux_unlinkat */
+	"linux_renameat",			/* 302 = linux_renameat */
+	"linux_linkat",			/* 303 = linux_linkat */
+	"linux_symlinkat",			/* 304 = linux_symlinkat */
+	"linux_readlinkat",			/* 305 = linux_readlinkat */
+	"linux_fchmodat",			/* 306 = linux_fchmodat */
+	"linux_faccessat",			/* 307 = linux_faccessat */
+	"linux_pselect6",			/* 308 = linux_pselect6 */
+	"linux_ppoll",			/* 309 = linux_ppoll */
+	"linux_unshare",			/* 310 = linux_unshare */
+	"linux_set_robust_list",			/* 311 = linux_set_robust_list */
+	"linux_get_robust_list",			/* 312 = linux_get_robust_list */
+	"linux_splice",			/* 313 = linux_splice */
+	"linux_sync_file_range",			/* 314 = linux_sync_file_range */
+	"linux_tee",			/* 315 = linux_tee */
+	"linux_vmsplice",			/* 316 = linux_vmsplice */
+};

Modified: stable/8/sys/amd64/linux32/linux32_sysent.c
==============================================================================
--- stable/8/sys/amd64/linux32/linux32_sysent.c	Wed Jun  1 05:50:24 2011	(r222555)
+++ stable/8/sys/amd64/linux32/linux32_sysent.c	Wed Jun  1 06:01:17 2011	(r222556)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 220466 2011-04-09 08:29:07Z avg 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 2011-06-01 05:50:24Z art 
  */
 
 #include "opt_compat.h"

Added: stable/8/sys/amd64/linux32/linux32_systrace_args.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/sys/amd64/linux32/linux32_systrace_args.c	Wed Jun  1 06:01:17 2011	(r222556)
@@ -0,0 +1,5126 @@
+/*
+ * System call argument to DTrace register array converstion.
+ *
+ * DO NOT EDIT-- this file is automatically generated.
+ * $FreeBSD$
+ * This file is part of the DTrace syscall provider.
+ */
+
+static void
+systrace_args(int sysnum, void *params, u_int64_t *uarg, int *n_args)
+{
+	int64_t *iarg  = (int64_t *) uarg;
+	switch (sysnum) {
+#define	nosys	linux_nosys
+	/* sys_exit */
+	case 1: {
+		struct sys_exit_args *p = params;
+		iarg[0] = p->rval; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_fork */
+	case 2: {
+		*n_args = 0;
+		break;
+	}
+	/* read */
+	case 3: {
+		struct read_args *p = params;
+		iarg[0] = p->fd; /* int */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		uarg[2] = p->nbyte; /* u_int */
+		*n_args = 3;
+		break;
+	}
+	/* write */
+	case 4: {
+		struct write_args *p = params;
+		iarg[0] = p->fd; /* int */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		uarg[2] = p->nbyte; /* u_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_open */
+	case 5: {
+		struct linux_open_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		iarg[2] = p->mode; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* close */
+	case 6: {
+		struct close_args *p = params;
+		iarg[0] = p->fd; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_waitpid */
+	case 7: {
+		struct linux_waitpid_args *p = params;
+		iarg[0] = p->pid; /* l_pid_t */
+		uarg[1] = (intptr_t) p->status; /* l_int * */
+		iarg[2] = p->options; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_creat */
+	case 8: {
+		struct linux_creat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_link */
+	case 9: {
+		struct linux_link_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_unlink */
+	case 10: {
+		struct linux_unlink_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_execve */
+	case 11: {
+		struct linux_execve_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->argp; /* u_int32_t * */
+		uarg[2] = (intptr_t) p->envp; /* u_int32_t * */
+		*n_args = 3;
+		break;
+	}
+	/* linux_chdir */
+	case 12: {
+		struct linux_chdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_time */
+	case 13: {
+		struct linux_time_args *p = params;
+		uarg[0] = (intptr_t) p->tm; /* l_time_t * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_mknod */
+	case 14: {
+		struct linux_mknod_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		iarg[2] = p->dev; /* l_dev_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_chmod */
+	case 15: {
+		struct linux_chmod_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_mode_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lchown16 */
+	case 16: {
+		struct linux_lchown16_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->uid; /* l_uid16_t */
+		iarg[2] = p->gid; /* l_gid16_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_stat */
+	case 18: {
+		struct linux_stat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->up; /* struct linux_stat * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lseek */
+	case 19: {
+		struct linux_lseek_args *p = params;
+		iarg[0] = p->fdes; /* l_uint */
+		iarg[1] = p->off; /* l_off_t */
+		iarg[2] = p->whence; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* linux_getpid */
+	case 20: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_mount */
+	case 21: {
+		struct linux_mount_args *p = params;
+		uarg[0] = (intptr_t) p->specialfile; /* char * */
+		uarg[1] = (intptr_t) p->dir; /* char * */
+		uarg[2] = (intptr_t) p->filesystemtype; /* char * */
+		iarg[3] = p->rwflag; /* l_ulong */
+		uarg[4] = (intptr_t) p->data; /* void * */
+		*n_args = 5;
+		break;
+	}
+	/* linux_oldumount */
+	case 22: {
+		struct linux_oldumount_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setuid16 */
+	case 23: {
+		struct linux_setuid16_args *p = params;
+		iarg[0] = p->uid; /* l_uid16_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_getuid16 */
+	case 24: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_stime */
+	case 25: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_ptrace */
+	case 26: {
+		struct linux_ptrace_args *p = params;
+		iarg[0] = p->req; /* l_long */
+		iarg[1] = p->pid; /* l_long */
+		iarg[2] = p->addr; /* l_long */
+		iarg[3] = p->data; /* l_long */
+		*n_args = 4;
+		break;
+	}
+	/* linux_alarm */
+	case 27: {
+		struct linux_alarm_args *p = params;
+		iarg[0] = p->secs; /* l_uint */
+		*n_args = 1;
+		break;
+	}
+	/* linux_pause */
+	case 29: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_utime */
+	case 30: {
+		struct linux_utime_args *p = params;
+		uarg[0] = (intptr_t) p->fname; /* char * */
+		uarg[1] = (intptr_t) p->times; /* struct l_utimbuf * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_access */
+	case 33: {
+		struct linux_access_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_nice */
+	case 34: {
+		struct linux_nice_args *p = params;
+		iarg[0] = p->inc; /* l_int */
+		*n_args = 1;
+		break;
+	}
+	/* sync */
+	case 36: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_kill */
+	case 37: {
+		struct linux_kill_args *p = params;
+		iarg[0] = p->pid; /* l_int */
+		iarg[1] = p->signum; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_rename */
+	case 38: {
+		struct linux_rename_args *p = params;
+		uarg[0] = (intptr_t) p->from; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_mkdir */
+	case 39: {
+		struct linux_mkdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->mode; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_rmdir */
+	case 40: {
+		struct linux_rmdir_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* dup */
+	case 41: {
+		struct dup_args *p = params;
+		uarg[0] = p->fd; /* u_int */
+		*n_args = 1;
+		break;
+	}
+	/* linux_pipe */
+	case 42: {
+		struct linux_pipe_args *p = params;
+		uarg[0] = (intptr_t) p->pipefds; /* l_ulong * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_times */
+	case 43: {
+		struct linux_times_args *p = params;
+		uarg[0] = (intptr_t) p->buf; /* struct l_times_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_brk */
+	case 45: {
+		struct linux_brk_args *p = params;
+		iarg[0] = p->dsend; /* l_ulong */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setgid16 */
+	case 46: {
+		struct linux_setgid16_args *p = params;
+		iarg[0] = p->gid; /* l_gid16_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_getgid16 */
+	case 47: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_signal */
+	case 48: {
+		struct linux_signal_args *p = params;
+		iarg[0] = p->sig; /* l_int */
+		iarg[1] = p->handler; /* l_handler_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_geteuid16 */
+	case 49: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_getegid16 */
+	case 50: {
+		*n_args = 0;
+		break;
+	}
+	/* acct */
+	case 51: {
+		struct acct_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_umount */
+	case 52: {
+		struct linux_umount_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->flags; /* l_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_ioctl */
+	case 54: {
+		struct linux_ioctl_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		iarg[1] = p->cmd; /* l_uint */
+		uarg[2] = p->arg; /* uintptr_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_fcntl */
+	case 55: {
+		struct linux_fcntl_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		iarg[1] = p->cmd; /* l_uint */
+		uarg[2] = p->arg; /* uintptr_t */
+		*n_args = 3;
+		break;
+	}
+	/* setpgid */
+	case 57: {
+		struct setpgid_args *p = params;
+		iarg[0] = p->pid; /* int */
+		iarg[1] = p->pgid; /* int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_olduname */
+	case 59: {
+		*n_args = 0;
+		break;
+	}
+	/* umask */
+	case 60: {
+		struct umask_args *p = params;
+		iarg[0] = p->newmask; /* int */
+		*n_args = 1;
+		break;
+	}
+	/* chroot */
+	case 61: {
+		struct chroot_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_ustat */
+	case 62: {
+		struct linux_ustat_args *p = params;
+		iarg[0] = p->dev; /* l_dev_t */
+		uarg[1] = (intptr_t) p->ubuf; /* struct l_ustat * */
+		*n_args = 2;
+		break;
+	}
+	/* dup2 */
+	case 63: {
+		struct dup2_args *p = params;
+		uarg[0] = p->from; /* u_int */
+		uarg[1] = p->to; /* u_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getppid */
+	case 64: {
+		*n_args = 0;
+		break;
+	}
+	/* getpgrp */
+	case 65: {
+		*n_args = 0;
+		break;
+	}
+	/* setsid */
+	case 66: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_sigaction */
+	case 67: {
+		struct linux_sigaction_args *p = params;
+		iarg[0] = p->sig; /* l_int */
+		uarg[1] = (intptr_t) p->nsa; /* l_osigaction_t * */
+		uarg[2] = (intptr_t) p->osa; /* l_osigaction_t * */
+		*n_args = 3;
+		break;
+	}
+	/* linux_sgetmask */
+	case 68: {
+		*n_args = 0;
+		break;
+	}
+	/* linux_ssetmask */
+	case 69: {
+		struct linux_ssetmask_args *p = params;
+		iarg[0] = p->mask; /* l_osigset_t */
+		*n_args = 1;
+		break;
+	}
+	/* linux_setreuid16 */
+	case 70: {
+		struct linux_setreuid16_args *p = params;
+		iarg[0] = p->ruid; /* l_uid16_t */
+		iarg[1] = p->euid; /* l_uid16_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setregid16 */
+	case 71: {
+		struct linux_setregid16_args *p = params;
+		iarg[0] = p->rgid; /* l_gid16_t */
+		iarg[1] = p->egid; /* l_gid16_t */
+		*n_args = 2;
+		break;
+	}
+	/* linux_sigsuspend */
+	case 72: {
+		struct linux_sigsuspend_args *p = params;
+		iarg[0] = p->hist0; /* l_int */
+		iarg[1] = p->hist1; /* l_int */
+		iarg[2] = p->mask; /* l_osigset_t */
+		*n_args = 3;
+		break;
+	}
+	/* linux_sigpending */
+	case 73: {
+		struct linux_sigpending_args *p = params;
+		uarg[0] = (intptr_t) p->mask; /* l_osigset_t * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_sethostname */
+	case 74: {
+		struct linux_sethostname_args *p = params;
+		uarg[0] = (intptr_t) p->hostname; /* char * */
+		uarg[1] = p->len; /* u_int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setrlimit */
+	case 75: {
+		struct linux_setrlimit_args *p = params;
+		iarg[0] = p->resource; /* l_uint */
+		uarg[1] = (intptr_t) p->rlim; /* struct l_rlimit * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_old_getrlimit */
+	case 76: {
+		struct linux_old_getrlimit_args *p = params;
+		iarg[0] = p->resource; /* l_uint */
+		uarg[1] = (intptr_t) p->rlim; /* struct l_rlimit * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getrusage */
+	case 77: {
+		struct linux_getrusage_args *p = params;
+		iarg[0] = p->who; /* int */
+		uarg[1] = (intptr_t) p->rusage; /* struct l_rusage * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_gettimeofday */
+	case 78: {
+		struct linux_gettimeofday_args *p = params;
+		uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */
+		uarg[1] = (intptr_t) p->tzp; /* struct timezone * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_settimeofday */
+	case 79: {
+		struct linux_settimeofday_args *p = params;
+		uarg[0] = (intptr_t) p->tp; /* struct l_timeval * */
+		uarg[1] = (intptr_t) p->tzp; /* struct timezone * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_getgroups16 */
+	case 80: {
+		struct linux_getgroups16_args *p = params;
+		iarg[0] = p->gidsetsize; /* l_uint */
+		uarg[1] = (intptr_t) p->gidset; /* l_gid16_t * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_setgroups16 */
+	case 81: {
+		struct linux_setgroups16_args *p = params;
+		iarg[0] = p->gidsetsize; /* l_uint */
+		uarg[1] = (intptr_t) p->gidset; /* l_gid16_t * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_old_select */
+	case 82: {
+		struct linux_old_select_args *p = params;
+		uarg[0] = (intptr_t) p->ptr; /* struct l_old_select_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_symlink */
+	case 83: {
+		struct linux_symlink_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->to; /* char * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_lstat */
+	case 84: {
+		struct linux_lstat_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		uarg[1] = (intptr_t) p->up; /* struct linux_lstat * */
+		*n_args = 2;
+		break;
+	}
+	/* linux_readlink */
+	case 85: {
+		struct linux_readlink_args *p = params;
+		uarg[0] = (intptr_t) p->name; /* char * */
+		uarg[1] = (intptr_t) p->buf; /* char * */
+		iarg[2] = p->count; /* l_int */
+		*n_args = 3;
+		break;
+	}
+	/* swapon */
+	case 87: {
+		struct swapon_args *p = params;
+		uarg[0] = (intptr_t) p->name; /* char * */
+		*n_args = 1;
+		break;
+	}
+	/* linux_reboot */
+	case 88: {
+		struct linux_reboot_args *p = params;
+		iarg[0] = p->magic1; /* l_int */
+		iarg[1] = p->magic2; /* l_int */
+		iarg[2] = p->cmd; /* l_uint */
+		uarg[3] = (intptr_t) p->arg; /* void * */
+		*n_args = 4;
+		break;
+	}
+	/* linux_readdir */
+	case 89: {
+		struct linux_readdir_args *p = params;
+		iarg[0] = p->fd; /* l_uint */
+		uarg[1] = (intptr_t) p->dent; /* struct l_dirent * */
+		iarg[2] = p->count; /* l_uint */
+		*n_args = 3;
+		break;
+	}
+	/* linux_mmap */
+	case 90: {
+		struct linux_mmap_args *p = params;
+		uarg[0] = (intptr_t) p->ptr; /* struct l_mmap_argv * */
+		*n_args = 1;
+		break;
+	}
+	/* munmap */
+	case 91: {
+		struct munmap_args *p = params;
+		uarg[0] = (intptr_t) p->addr; /* caddr_t */
+		iarg[1] = p->len; /* int */
+		*n_args = 2;
+		break;
+	}
+	/* linux_truncate */
+	case 92: {
+		struct linux_truncate_args *p = params;
+		uarg[0] = (intptr_t) p->path; /* char * */
+		iarg[1] = p->length; /* l_ulong */
+		*n_args = 2;
+		break;
+	}
+	/* linux_ftruncate */
+	case 93: {
+		struct linux_ftruncate_args *p = params;
+		iarg[0] = p->fd; /* int */
+		iarg[1] = p->length; /* long */
+		*n_args = 2;
+		break;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 9 dfilter service freebsd_committer freebsd_triage 2011-06-01 07:08:16 UTC
Author: art
Date: Wed Jun  1 06:07:57 2011
New Revision: 222557
URL: http://svn.freebsd.org/changeset/base/222557

Log:
  MFC r219561, r220437:
  add DTrace systrace support for linux32 and freebsd32 on amd64 syscalls
  
  Add systrace_linux32 and systrace_freebsd32 modules which provide
  support for tracing compat system calls in addition to native system
  call tracing provided by systrace module.
  
  Provided that all the systrace modules are loaded now you can select
  what syscalls to trace in the following manner:
  
  syscall::xxx:yyy - work on all system calls that match the specification
  syscall:freebsd:xxx:yyy - only native system calls
  syscall:linux:xxx:yyy - linux compat system calls (linux32 on amd64)
  syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64
  
  PR:         kern/152822
  Reviewed by:        jhb (earlier version)
  Approved by:	avg (mentor)

Added:
  stable/8/sys/modules/dtrace/systrace_freebsd32/
     - copied from r219561, head/sys/modules/dtrace/systrace_freebsd32/
  stable/8/sys/modules/dtrace/systrace_linux32/
     - copied from r219561, head/sys/modules/dtrace/systrace_linux32/
Modified:
  stable/8/sys/cddl/dev/systrace/systrace.c
  stable/8/sys/modules/dtrace/Makefile
  stable/8/sys/modules/dtrace/dtraceall/Makefile
  stable/8/sys/modules/dtrace/dtraceall/dtraceall.c
  stable/8/sys/modules/dtrace/systrace_linux32/Makefile
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/cddl/dev/systrace/systrace.c
==============================================================================
--- stable/8/sys/cddl/dev/systrace/systrace.c	Wed Jun  1 06:01:17 2011	(r222556)
+++ stable/8/sys/cddl/dev/systrace/systrace.c	Wed Jun  1 06:07:57 2011	(r222557)
@@ -59,17 +59,39 @@
 #include <sys/dtrace.h>
 
 #ifdef LINUX_SYSTRACE
-#include <linux.h>
-#include <linux_syscall.h>
-#include <linux_proto.h>
-#include <linux_syscallnames.c>
-#include <linux_systrace.c>
+#if defined(__amd64__)
+#include <amd64/linux32/linux.h>
+#include <amd64/linux32/linux32_proto.h>
+#include <amd64/linux32/linux32_syscalls.c>
+#include <amd64/linux32/linux32_systrace_args.c>
+#define	MODNAME		"linux32"
+#elif defined(__i386__)
+#include <i386/linux/linux.h>
+#include <i386/linux/linux_proto.h>
+#include <i386/linux/linux_syscalls.c>
+#include <i386/linux/linux_systrace_args.c>
+#define	MODNAME		"linux"
+#else
+#error Only i386 and amd64 are supported.
+#endif
 extern struct sysent linux_sysent[];
-#define	DEVNAME		"dtrace/linsystrace"
-#define	PROVNAME	"linsyscall"
 #define	MAXSYSCALL	LINUX_SYS_MAXSYSCALL
 #define	SYSCALLNAMES	linux_syscallnames
 #define	SYSENT		linux_sysent
+#elif defined(FREEBSD32_SYSTRACE)
+/*
+ * The syscall arguments are processed into a DTrace argument array
+ * using a generated function. See sys/kern/makesyscalls.sh.
+ */
+#include <compat/freebsd32/freebsd32_proto.h>
+#include <compat/freebsd32/freebsd32_util.h>
+#include <compat/freebsd32/freebsd32_syscall.h>
+#include <compat/freebsd32/freebsd32_systrace_args.c>
+extern const char *freebsd32_syscallnames[];
+#define	MODNAME		"freebsd32"
+#define	MAXSYSCALL	FREEBSD32_SYS_MAXSYSCALL
+#define	SYSCALLNAMES	freebsd32_syscallnames
+#define	SYSENT		freebsd32_sysent
 #else
 /*
  * The syscall arguments are processed into a DTrace argument array
@@ -77,13 +99,15 @@ extern struct sysent linux_sysent[];
  */
 #include <sys/syscall.h>
 #include <kern/systrace_args.c>
-#define	DEVNAME		"dtrace/systrace"
-#define	PROVNAME	"syscall"
+#define	MODNAME		"freebsd"
 #define	MAXSYSCALL	SYS_MAXSYSCALL
 #define	SYSCALLNAMES	syscallnames
 #define	SYSENT		sysent
 #endif
 
+#define	PROVNAME	"syscall"
+#define	DEVNAME	        "dtrace/systrace/" MODNAME
+
 #define	SYSTRACE_ARTIFICIAL_FRAMES	1
 
 #define	SYSTRACE_SHIFT			16
@@ -109,7 +133,7 @@ static struct cdevsw systrace_cdevsw = {
 	.d_version	= D_VERSION,
 	.d_open		= systrace_open,
 #ifdef LINUX_SYSTRACE
-	.d_name		= "linsystrace",
+	.d_name		= "systrace_" MODNAME,
 #else
 	.d_name		= "systrace",
 #endif
@@ -214,14 +238,14 @@ systrace_provide(void *arg, dtrace_probe
 		return;
 
 	for (i = 0; i < MAXSYSCALL; i++) {
-		if (dtrace_probe_lookup(systrace_id, NULL,
+		if (dtrace_probe_lookup(systrace_id, MODNAME,
 		    uglyhack.pp_syscallnames[i], "entry") != 0)
 			continue;
 
-		(void) dtrace_probe_create(systrace_id, NULL, uglyhack.pp_syscallnames[i],
+		(void) dtrace_probe_create(systrace_id, MODNAME, uglyhack.pp_syscallnames[i],
 		    "entry", SYSTRACE_ARTIFICIAL_FRAMES,
 		    (void *)((uintptr_t)SYSTRACE_ENTRY(i)));
-		(void) dtrace_probe_create(systrace_id, NULL, uglyhack.pp_syscallnames[i],
+		(void) dtrace_probe_create(systrace_id, MODNAME, uglyhack.pp_syscallnames[i],
 		    "return", SYSTRACE_ARTIFICIAL_FRAMES,
 		    (void *)((uintptr_t)SYSTRACE_RETURN(i)));
 	}
@@ -335,12 +359,16 @@ SYSINIT(systrace_load, SI_SUB_DTRACE_PRO
 SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL);
 
 #ifdef LINUX_SYSTRACE
-DEV_MODULE(linsystrace, systrace_modevent, NULL);
-MODULE_VERSION(linsystrace, 1);
-MODULE_DEPEND(linsystrace, linux, 1, 1, 1);
-MODULE_DEPEND(linsystrace, systrace, 1, 1, 1);
-MODULE_DEPEND(linsystrace, dtrace, 1, 1, 1);
-MODULE_DEPEND(linsystrace, opensolaris, 1, 1, 1);
+DEV_MODULE(systrace_linux32, systrace_modevent, NULL);
+MODULE_VERSION(systrace_linux32, 1);
+MODULE_DEPEND(systrace_linux32, linux, 1, 1, 1);
+MODULE_DEPEND(systrace_linux32, dtrace, 1, 1, 1);
+MODULE_DEPEND(systrace_linux32, opensolaris, 1, 1, 1);
+#elif defined(FREEBSD32_SYSTRACE)
+DEV_MODULE(systrace_freebsd32, systrace_modevent, NULL);
+MODULE_VERSION(systrace_freebsd32, 1);
+MODULE_DEPEND(systrace_freebsd32, dtrace, 1, 1, 1);
+MODULE_DEPEND(systrace_freebsd32, opensolaris, 1, 1, 1);
 #else
 DEV_MODULE(systrace, systrace_modevent, NULL);
 MODULE_VERSION(systrace, 1);

Modified: stable/8/sys/modules/dtrace/Makefile
==============================================================================
--- stable/8/sys/modules/dtrace/Makefile	Wed Jun  1 06:01:17 2011	(r222556)
+++ stable/8/sys/modules/dtrace/Makefile	Wed Jun  1 06:07:57 2011	(r222557)
@@ -15,7 +15,10 @@ SUBDIR=		dtmalloc	\
 		systrace
 
 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
-SUBDIR+=	fasttrap fbt
+SUBDIR+=	fasttrap fbt systrace_linux32
+.endif
+.if ${MACHINE_ARCH} == "amd64"
+SUBDIR+=	systrace_freebsd32
 .endif
 
 .include <bsd.subdir.mk>

Modified: stable/8/sys/modules/dtrace/dtraceall/Makefile
==============================================================================
--- stable/8/sys/modules/dtrace/dtraceall/Makefile	Wed Jun  1 06:01:17 2011	(r222556)
+++ stable/8/sys/modules/dtrace/dtraceall/Makefile	Wed Jun  1 06:07:57 2011	(r222557)
@@ -1,8 +1,15 @@
 # $FreeBSD$
 
 KMOD=		dtraceall
-SRCS=		dtraceall.c
+SRCS=		dtraceall.c opt_compat.h
 
 CFLAGS+=	-I${.CURDIR}/../../..
 
+.if !defined(KERNBUILDDIR)
+opt_compat.h:
+.if ${MACHINE_ARCH} == "amd64"
+	echo "#define COMPAT_FREEBSD32 1" >> ${.TARGET}
+.endif
+.endif
+
 .include <bsd.kmod.mk>

Modified: stable/8/sys/modules/dtrace/dtraceall/dtraceall.c
==============================================================================
--- stable/8/sys/modules/dtrace/dtraceall/dtraceall.c	Wed Jun  1 06:01:17 2011	(r222556)
+++ stable/8/sys/modules/dtrace/dtraceall/dtraceall.c	Wed Jun  1 06:07:57 2011	(r222557)
@@ -32,6 +32,7 @@
 #include <sys/kernel.h>
 #include <sys/module.h>
 #include <sys/errno.h>
+#include "opt_compat.h"
 
 static int
 dtraceall_modevent(module_t mod __unused, int type, void *data __unused)
@@ -73,4 +74,7 @@ MODULE_DEPEND(dtraceall, fasttrap, 1, 1,
 MODULE_DEPEND(dtraceall, lockstat, 1, 1, 1);
 MODULE_DEPEND(dtraceall, sdt, 1, 1, 1);
 MODULE_DEPEND(dtraceall, systrace, 1, 1, 1);
+#if defined(COMPAT_FREEBSD32)
+MODULE_DEPEND(dtraceall, systrace_freebsd32, 1, 1, 1);
+#endif
 MODULE_DEPEND(dtraceall, profile, 1, 1, 1);

Modified: stable/8/sys/modules/dtrace/systrace_linux32/Makefile
==============================================================================
--- head/sys/modules/dtrace/systrace_linux32/Makefile	Sat Mar 12 09:09:25 2011	(r219561)
+++ stable/8/sys/modules/dtrace/systrace_linux32/Makefile	Wed Jun  1 06:07:57 2011	(r222557)
@@ -2,7 +2,12 @@
 
 .PATH: ${.CURDIR}/../../../cddl/dev/systrace
 
+.if ${MACHINE} == "amd64"
 KMOD=		systrace_linux32
+.else
+KMOD=		systrace_linux
+.endif
+
 SRCS=		systrace.c
 SRCS+=		vnode_if.h
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 10 Artem Belevich freebsd_committer freebsd_triage 2011-06-28 03:04:13 UTC
State Changed
From-To: patched->closed

Changes have been MFC-ed to 8-stable