summaryrefslogtreecommitdiffstats
path: root/sys/cddl/dev/systrace/systrace.c
Commit message (Collapse)AuthorAgeFilesLines
* Support an arbitrary number of arguments to DTrace syscall probes.markj2015-12-171-37/+52
| | | | | | | | | | Rather than pushing all eight possible arguments into dtrace_probe()'s stack frame, make the syscall_args struct for the current syscall available via the current thread. Using a custom getargval method for the systrace provider, this allows any syscall argument to be fetched, even in kernels that have modified the maximum number of system call arguments. Sponsored by: EMC / Isilon Storage Division
* Remove the unused systrace device file and fix style bugs.markj2015-12-161-61/+41
| | | | MFC after: 1 week
* Rename remaining linux32 symbols such as linux_sysent[] andjhb2015-10-221-10/+34
| | | | | | | | | | | | | | | | | linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D3954
* Ensure that all eight syscall arguments are available to dtrace_probe(),markj2014-04-141-1/+7
| | | | | | | rather than just the first five. This is done by calling dtrace_probe() through a function pointer, as in illumos. MFC after: 3 weeks
* Revert r262466, as it does not compile on PowerPC.markj2014-02-261-5/+1
| | | | Reported by: jhibbits
* Make all 8 syscall arguments available to syscall probes in the same waymarkj2014-02-251-1/+5
| | | | | | | | that this is done for SDT probes. This fixes the syscall/tst.args.d test, which was failing because mmap(2)'s sixth argument wasn't available to the probe. MFC after: 2 weeks
* Correct the types of the arguments to return probes of the syscallrstone2011-11-111-2/+7
| | | | | | | | provider. Previously we were erroneously supplying the argument types of the corresponding entry probe. Reviewed by: rpaulo MFC after: 1 week
* Stripped '32' suffix from linux systrace module name on i386.art2011-04-081-2/+3
| | | | Approved by: avg
* add DTrace systrace support for linux32 and freebsd32 on amd64 syscallsavg2011-03-121-18/+45
| | | | | | | | | | | | | | | | | | | Add systrace_linux32 and systrace_freebsd32 modules which provide support for tracing compat system calls in addition to native system call tracing provided by systrace module. Provided that all the systrace modules are loaded now you can select what syscalls to trace in the following manner: syscall::xxx:yyy - work on all system calls that match the specification syscall:freebsd:xxx:yyy - only native system calls syscall:linux32:xxx:yyy - linux32 compat system calls syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64 PR: kern/152822 Submitted by: Artem Belevich <fbsdlist@src.cx> Reviewed by: jhb (earlier version) MFC after: 3 weeks
* Kernel DTrace support for:rpaulo2010-08-221-3/+12
| | | | | | | | | o uregs (sson@) o ustack (sson@) o /dev/dtrace/helper device (needed for USDT probes) The work done by me was: Sponsored by: The FreeBSD Foundation
* Reorganize syscall entry and leave handling.kib2010-05-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend struct sysvec with three new elements: sv_fetch_syscall_args - the method to fetch syscall arguments from usermode into struct syscall_args. The structure is machine-depended (this might be reconsidered after all architectures are converted). sv_set_syscall_retval - the method to set a return value for usermode from the syscall. It is a generalization of cpu_set_syscall_retval(9) to allow ABIs to override the way to set a return value. sv_syscallnames - the table of syscall names. Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding the call to cpu_set_syscall_retval(). The new functions syscallenter(9) and syscallret(9) are provided that use sv_*syscall* pointers and contain the common repeated code from the syscall() implementations for the architecture-specific syscall trap handlers. Syscallenter() fetches arguments, calls syscall implementation from ABI sysent table, and set up return frame. The end of syscall bookkeeping is done by syscallret(). Take advantage of single place for MI syscall handling code and implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the thread is stopped at syscall entry or return point respectively. The EXEC flag augments SCX and notifies debugger that the process address space was changed by one of exec(2)-family syscalls. The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are changed to use syscallenter()/syscallret(). MIPS and arm are not converted and use the mostly unchanged syscall() implementation. Reviewed by: jhb, marcel, marius, nwhitehorn, stas Tested by: marcel (ia64), marius (sparc64), nwhitehorn (powerpc), stas (mips) MFC after: 1 month
* Merge latest DTrace changes from Perforce.rodrigc2008-11-051-26/+75
|
* Custom DTrace kernel module files plus FreeBSD-specific DTrace providers.jb2008-05-231-0/+292
OpenPOWER on IntegriCloud