#
0f21f528 |
| 03-Aug-2016 |
Baptiste Daroussin <bapt@FreeBSD.org> |
truss: fix uninitialized trussinfo->curthread in add_threads()/enter_syscall
trussinfo->curthread must be initialized before calling enter_syscall(), it is used by t->proc->abi->fetch_args(). Withou
truss: fix uninitialized trussinfo->curthread in add_threads()/enter_syscall
trussinfo->curthread must be initialized before calling enter_syscall(), it is used by t->proc->abi->fetch_args(). Without that truss is segfaulting and the attached program also crash.
Submitted by: Nikita Kozlov (nikita@gandi.net) Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7399
show more ...
|
Revision tags: release/10.3.0 |
|
#
7d536dc8 |
| 10-Mar-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
b9befd33 |
| 09-Mar-2016 |
John Baldwin <jhb@FreeBSD.org> |
Use ptrace(2) LWP events to track threads reliably in truss.
- truss can now log the system call invoked by a thread during a voluntary process exit. No return value is logged, but the value pass
Use ptrace(2) LWP events to track threads reliably in truss.
- truss can now log the system call invoked by a thread during a voluntary process exit. No return value is logged, but the value passed to exit() is included in the trace output. Arguments passed to thread exit system calls such as thr_exit() are not logged as voluntary thread exits cannot be distinguished from involuntary thread exits during a system call. - New events are now reported for thread births and exits similar to the recently added events for new child processes when following forks.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D5561
show more ...
|
#
14e9c916 |
| 24-Feb-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r295902 through r296006.
|
#
aef2f6ad |
| 24-Feb-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
d70876fd |
| 23-Feb-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add support for displaying thread IDs to truss(1).
- Consolidate duplicate code for printing the metadata at the start of each line into a shared function. - Add an -H option which will log the th
Add support for displaying thread IDs to truss(1).
- Consolidate duplicate code for printing the metadata at the start of each line into a shared function. - Add an -H option which will log the thread ID of the relevant thread for each event.
While here, remove some extraneous calls to clock_gettime() in print_syscall() and print_syscall_ret(). The caller of print_syscall_ret() always updates the current thread's "after" time before it is called.
Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D5363
show more ...
|
#
9893f787 |
| 21-Feb-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r295601 through r295844.
|
#
72c3aa02 |
| 18-Feb-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
00ddbdf2 |
| 16-Feb-2016 |
John Baldwin <jhb@FreeBSD.org> |
Fetch the current thread and it's syscall state from the trussinfo object instead of passing some of that state as arguments to print_syscall() and print_syscallret(). This just makes the calls of t
Fetch the current thread and it's syscall state from the trussinfo object instead of passing some of that state as arguments to print_syscall() and print_syscallret(). This just makes the calls of these functions shorter and easier to read.
show more ...
|
#
2414e864 |
| 03-Feb-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MfH @r295202
Expect to see panics in routing code at least now.
|
#
752d0060 |
| 27-Jan-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r294777 through r294960.
|
#
0e186c0a |
| 27-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
a5f14abf |
| 26-Jan-2016 |
John Baldwin <jhb@FreeBSD.org> |
Add support to libsysdecode for decoding system call names.
A new sysdecode_syscallname() function accepts a system call code and returns a string of the corresponding name (or NULL if the code is u
Add support to libsysdecode for decoding system call names.
A new sysdecode_syscallname() function accepts a system call code and returns a string of the corresponding name (or NULL if the code is unknown). To support different process ABIs, the new function accepts a value from a new sysdecode_abi enum as its first argument to select the ABI in use. Current ABIs supported include FREEBSD (native binaries), FREEBSD32, LINUX, LINUX32, and CLOUDABI64. Note that not all ABIs are supported by all platforms. In general, a given ABI is only supported if a platform can execute binaries for that ABI.
To simplify the implementation, libsysdecode's build reuses the existing pre-generated files from the kernel source tree rather than duplicating new copies of said files during the build.
kdump(1) and truss(1) now use these functions to map system call identifiers to names. For kdump(1), a new 'syscallname()' function consolidates duplicated code from ktrsyscall() and ktrsyscallret(). The Linux ABI no longer requires custom handling for ktrsyscall() and linux_ktrsyscall() has been removed as a result.
Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D4823
show more ...
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
becbad1f |
| 13-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
a997b777 |
| 13-Oct-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Sync up with head up to r289211.
|
#
9be27fdc |
| 10-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
88750be4 |
| 06-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288836 through r288925.
|
#
94746562 |
| 05-Oct-2015 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Fix crash if a process sends itself a SIGTRAP. Just forward it as expected.
MFC after: 2 weeks [needs rewrite] Relnotes: yes
|
#
926b24f3 |
| 05-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288831 through r288835.
|
#
6c61b0f3 |
| 05-Oct-2015 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Fix tracking of unknown syscalls for 'truss -c'.
This is done by changing get_syscall() to either lookup the known syscall or add it into the list with the default handlers for printing.
This also
Fix tracking of unknown syscalls for 'truss -c'.
This is done by changing get_syscall() to either lookup the known syscall or add it into the list with the default handlers for printing.
This also simplifies some code to not have to check if the syscall variable is set or NULL.
Reviewed by: jhb Relnotes: yes Differential Revision: https://reviews.freebsd.org/D3792
show more ...
|
#
65dcb5bc |
| 01-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288197 through r288456.
|
#
5a2b666c |
| 01-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
2b75c8ad |
| 30-Sep-2015 |
John Baldwin <jhb@FreeBSD.org> |
Several changes to truss. - Refactor the interface between the ABI-independent code and the ABI-specific backends. The backends now provide smaller hooks to fetch system call arguments and retur
Several changes to truss. - Refactor the interface between the ABI-independent code and the ABI-specific backends. The backends now provide smaller hooks to fetch system call arguments and return values. The rest of the system call entry and exit handling that was previously duplicated among all the backends has been moved to one place. - Merge the loop when waiting for an event with the loop for handling stops. This also means not emulating a procfs-like interface on top of ptrace(). Instead, use a single event loop that fetches process events via waitid(). Among other things this allows us to report the full 32-bit exit value. - Use PT_FOLLOW_FORK to follow new child processes instead of forking a new truss process for each new child. This allows one truss process to monitor a tree of processes and truss -c should now display one total for the entire tree instead of separate summaries per process. - Use the recently added fields to ptrace_lwpinfo to determine the current system call number and argument count. The latter is especially useful and fixes a regression since the conversion from procfs. truss now generally prints the correct number of arguments for most system calls rather than printing extra arguments for any call not listed in the table in syscalls.c. - Actually check the new ABI when processes call exec. The comments claimed that this happened but it was not being done (perhaps this was another regression in the conversion to ptrace()). If the new ABI after exec is not supported, truss detaches from the process. If truss does not support the ABI for a newly executed process the process is killed before it returns from exec. - Along with the refactor, teach the various ABI-specific backends to fetch both return values, not just the first. Use this to properly report the full 64-bit return value from lseek(). In addition, the handler for "pipe" now pulls the pair of descriptors out of the return values (which is the true kernel system call interface) but displays them as an argument (which matches the interface exported by libc). - Each ABI handler adds entries to a linker set rather than requiring a statically defined table of handlers in main.c. - The arm and mips system call fetching code was changed to follow the same pattern as amd64 (and the in-kernel handler) of fetching register arguments first and then reading any remaining arguments from the stack. This should fix indirect system call arguments on at least arm. - The mipsn32 and n64 ABIs will now look for arguments in A4 through A7. - Use register %ebp for the 6th system call argument for Linux/i386 ABIs to match the in-kernel argument fetch code. - For powerpc binaries on a powerpc64 system, fetch the extra arguments on the stack as 32-bit values that are then copied into the 64-bit argument array instead of reading the 32-bit values directly into the 64-bit array.
Reviewed by: kib (earlier version) Tested on: amd64 (FreeBSD/amd64 & i386), i386, arm (earlier version) Tested on: powerpc64 (FreeBSD/powerpc64 & powerpc) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D3575
show more ...
|
Revision tags: release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0 |
|
#
cfe30d02 |
| 19-Jun-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge fresh head.
|