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
This commit is contained in:
Mark Johnston 2016-09-22 04:49:31 +00:00
parent 14410265b6
commit 5a4dfc8d83

View File

@ -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, \