From owner-svn-src-head@FreeBSD.ORG Mon Apr 14 00:23:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF9BE532; Mon, 14 Apr 2014 00:23:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB8FC176F; Mon, 14 Apr 2014 00:23:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3E0NIWZ024047; Mon, 14 Apr 2014 00:23:18 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3E0NIG6024045; Mon, 14 Apr 2014 00:23:18 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201404140023.s3E0NIG6024045@svn.freebsd.org> From: Mark Johnston Date: Mon, 14 Apr 2014 00:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264435 - head/sys/cddl/dev/systrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 00:23:18 -0000 Author: markj Date: Mon Apr 14 00:23:18 2014 New Revision: 264435 URL: http://svnweb.freebsd.org/changeset/base/264435 Log: Ensure that all eight syscall arguments are available to dtrace_probe(), rather than just the first five. This is done by calling dtrace_probe() through a function pointer, as in illumos. MFC after: 3 weeks Modified: head/sys/cddl/dev/systrace/systrace.c Modified: head/sys/cddl/dev/systrace/systrace.c ============================================================================== --- head/sys/cddl/dev/systrace/systrace.c Mon Apr 14 00:22:42 2014 (r264434) +++ head/sys/cddl/dev/systrace/systrace.c Mon Apr 14 00:23:18 2014 (r264435) @@ -168,6 +168,9 @@ static dtrace_pops_t systrace_pops = { static struct cdev *systrace_cdev; static dtrace_provider_id_t systrace_id; +typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, + uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); + #if !defined(LINUX_SYSTRACE) /* * Probe callback function. @@ -180,6 +183,7 @@ static void systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params, int ret) { + systrace_dtrace_probe_t probe; int n_args = 0; u_int64_t uargs[8]; @@ -211,7 +215,9 @@ systrace_probe(u_int32_t id, int sysnum, } /* Process the probe using the converted argments. */ - dtrace_probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4]); + probe = (systrace_dtrace_probe_t)dtrace_probe; + probe(id, uargs[0], uargs[1], uargs[2], uargs[3], uargs[4], uargs[5], + uargs[6], uargs[7]); } #endif