dtrace and kernel modules

Mark Johnston markj at FreeBSD.org
Tue Jul 12 17:10:37 UTC 2016


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 at porridge:/usr/src # dtrace -n ":kgssapi::entry {}"
> dtrace: description ':kgssapi::entry ' matched 138 probes
> ^C
> 
> root at 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 at 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.


More information about the freebsd-current mailing list