From owner-freebsd-current@freebsd.org Wed Jul 13 00:24:55 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D62FCB97F35; Wed, 13 Jul 2016 00:24:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A54F919C7; Wed, 13 Jul 2016 00:24:55 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-236-103.lns20.per1.internode.on.net [121.45.236.103]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u6D0OhXG092434 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 12 Jul 2016 17:24:46 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: dtrace and kernel modules To: Mark Johnston References: <20160712171404.GB71220@wkstn-mjohnston.west.isilon.com> Cc: freebsd-dtrace@freebsd.org, freebsd-current From: Julian Elischer Message-ID: Date: Wed, 13 Jul 2016 08:24:37 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160712171404.GB71220@wkstn-mjohnston.west.isilon.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 00:24:55 -0000 On 13/07/2016 1:14 AM, Mark Johnston wrote: > On Thu, Jul 07, 2016 at 12:51:52PM +0800, Julian Elischer wrote: >> I'm specifically interested in the case of kernel modules that >> instantiate new syscalls. >> >> How much support do we have for that? In the one example in our >> sources of a kld with a syscall (kgssapi.ko) dtrace seems to find >> regular function entrypoints but not the syscall. >> >> >> root@porridge:/usr/src # dtrace -n ":kgssapi::entry {}" >> dtrace: description ':kgssapi::entry ' matched 138 probes >> ^C >> >> root@porridge:/usr/src # dtrace -n "syscall:kgssapi::entry {}" >> dtrace: invalid probe specifier syscall:kgssapi::entry {}: probe >> description syscall:kgssapi::entry does not match any probes >> root@porridge:/usr/src # >> >> >> Do we have plans to support dynamic syscall support? > I don't know of any plans to add support. It would be fairly > straightforward to dynamically create syscall probes using a hook or > eventhandler in syscall_register(), but getting argument type info would > be more difficult. Right now, argument types are specified by code > generated by makesyscalls.sh using the types in syscalls.master. I'm not > sure how one might obtain these types for dynamically-registered > syscalls. > yes that is the tricky part for sure. for now function calls is probably enough because every syscall ends up calling a function somewhere :-)