Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2016 04:49:31 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r306157 - head/sys/kern
Message-ID:  <201609220449.u8M4nVRt018344@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Sep 22 04:49:31 2016
New Revision: 306157
URL: https://svnweb.freebsd.org/changeset/base/306157

Log:
  Annotate syscall provider pointer arguments with the "userland" keyword.
  
  This causes dtrace to automatically copyin arguments from userland, so
  one no longer has to explicitly use the copyin() action to do so. Moreover,
  copyin() on userland addresses is a no-op, so existing scripts should be
  unaffected by this change.
  
  Discussed with:	rstone
  MFC after:	2 weeks

Modified:
  head/sys/kern/makesyscalls.sh

Modified: head/sys/kern/makesyscalls.sh
==============================================================================
--- head/sys/kern/makesyscalls.sh	Thu Sep 22 03:35:02 2016	(r306156)
+++ head/sys/kern/makesyscalls.sh	Thu Sep 22 04:49:31 2016	(r306157)
@@ -418,7 +418,10 @@ s/\$//g
 			for (i = 1; i <= argc; i++) {
 				arg = argtype[i]
 				sub("__restrict$", "", arg)
-				printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp
+				if (index(arg, "*") > 0)
+					printf("\t\tcase %d:\n\t\t\tp = \"userland %s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp
+				else
+					printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp
 				if (index(arg, "*") > 0 || arg == "caddr_t")
 					printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \
 					     i - 1, \



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