summaryrefslogtreecommitdiff
path: root/usr.bin/kdump
AgeCommit message (Collapse)Author
2016-07-18Add 'p' trace point for KTRFAC_PLEDGE, as noted byPhilip Guenther
Michal Mazurek <akfaew@jasminek.net> While here, fix handling of -t+ in ltrace.
2016-06-07ktrace support for pollfd[] arraysTheo de Raadt
ok guenther
2016-06-07add a hack to avoid printing the long string format for times in the 70s.Ted Unangst
this is usually a result of a timestamp which hasn't been identified as "relative" and decoding them to precise dates long in the past is a distraction. (eagerly awaiting a cleaner, better diff to do the same.)
2016-06-02allow printing timestamps relative to beginnging of trace, -RT. ok bennoTed Unangst
2016-05-22On hppa, function pointer comparison can require dereferencing them.Philip Guenther
kdump can't do that for a sigaction sa_handler pointer from the trace, so cast to void* to suppress it. ok deraadt@
2016-04-25remove systrace supportTed Unangst
2016-03-30Handle error return by SYS_getlogin_r and SYS___thrsleep correct, andPhilip Guenther
parse args of SYS_getlogin_r
2016-03-24Display NAMI records and AF_UNIX socket paths with vis, usingPhilip Guenther
VIS_CSTYLE | VIS_DQ | VIS_TAB | VIS_NL; add the latter three flags to the existing vis encoding of exec argv/environ and pledge requests/paths. Delete local variables left unused when showbuf() and showbufc() were split ok otto@ millert@
2016-03-22Format the flags argument to sendsyslog()Philip Guenther
ok deraadt@ bluhm@
2016-03-21Handle kbind()'s third argument correctlyPhilip Guenther
2016-03-13Recognize ipmi, vscsi, pvbus, udl, fuse, trunk, pipex and memrangenatano
ioctl requests.
2016-03-06Improve display of unknown and KTR_START recordsPhilip Guenther
request and ok naddy@
2016-03-06No more compat emulations, so remove ktrace EMUL records and the baggagePhilip Guenther
for generating and parsing them. ok mpi@ naddy@ millert@ deraadt@
2016-03-05Make the fd_set* passed to FD_ISSET() non-const: the non-macro version isPhilip Guenther
stricter (per POSIX, dang it)
2016-02-28drop the support for Linux emulation; ok guenther@ visa@Christian Weisgerber
2016-02-28Support for running Linux binaries under emulation is going away.Christian Weisgerber
Remove "option COMPAT_LINUX" and everything directly tied to it from the kernel and the corresponding man page documentation. ok visa@ guenther@
2016-02-26there is no emulation "bsd", our default is "native"; ok deraadt@ millert@Christian Weisgerber
2016-01-14Display struct event more like other structs: show all members and use cppPhilip Guenther
define names. Use the mksubr infrastructure for EVFILT_*, EV_*, and (with some kludging) NOTE_* values. If EV_ERROR is set, include the errno string for the data member. Also, do MSG_* parsing on the msg_flags member of struct msghdr. ok millert@
2016-01-06print more info about keventTed Unangst
2016-01-05include all i915 drm ioctls on top of the common drm onesRobert Nagy
ok deraadt@, kettenos@, guenther@
2015-12-25very basic kevent printingTed Unangst
2015-11-10Split the intra-thread functionality from kill(2) into its own syscallPhilip Guenther
thrkill(2), rolling the kill(2) syscall number with the ABI change to avoid breaking binaries during during the transition. thrkill(2) includes a 'tcb' argument that eliminates the need for locking in pthread_kill() and simplifies pthread_cancel(). Switch __stack_smash_handler() to use thrkill(2) and explicitly unblock SIGABRT. Minor bump to both libc and libpthread: make sure you install a new kernel! ok semarie@
2015-10-28remove knowledge of dnssocket/dnsconnectTheo de Raadt
2015-10-26If the system call is entirely unpermitted, code will be 0, and there isTheo de Raadt
no pledge to recommend.
2015-10-25Fold "malloc" into "stdio" and -- recognizing that no program so far hasTheo de Raadt
used less than "stdio" -- include all the "self" operations. Instead of different defines, use regular PLEDGE_* in the "p_pledgenote" variable (which indicates the operation subtype a system call is performing). Many checks before easier to understand. p_pledgenote can often be passed directly to ktrace, so that kdump says: 15565 test CALL pledge(0xa9a3f804c51,0) 15565 test STRU pledge request="stdio" 15565 test RET pledge 0 15565 test CALL open(0xa9a3f804c57,0x2<O_RDWR>) 15565 test NAMI "/tmp/testfile" 15565 test PLDG open, "wpath", errno 1 Operation not permitted with help from semarie, ok guenther
2015-10-18Use offsetof() instead of adding the sizes of the preceeding struct membersPhilip Guenther
ok millert@
2015-10-18Describe dnssocket / dnsconnect argumentsTheo de Raadt
2015-10-10normalize a few more tame request orderings, to help reviewTheo de Raadt
2015-10-10since kdump may getprotobynumber() late, do not drop "rpath". We couldTheo de Raadt
potentially modify pledge() to permit /etc/protocols (/etc/rpc? /etc/services? etc) without requiring a rpath attribute.. but where would we draw the line for what /etc files libc functions need? At present, we draw that line closer to the minimum. issue found by theo@math.ethz.ch
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-06tame "stdio getpw"Theo de Raadt
discussed with guenther
2015-10-03Add ktracing of tame()'s arguments' valuesPhilip Guenther
"every tool helps" deraadt@
2015-10-03option LFS is dead, but we missed option ACCOUNTING herePhilip Guenther
2015-10-03Fix wrong cast.Vadim Zhukov
This one should be an unsigned long in theory, but the formatter function argument we're printing from is already an int (being casted from register_t at the formatter call time). So lets fix one bug at a time. authoritative okay from guenther@
2015-10-03tame "stdio getpw rpath" can be done quite early after the getopt.Theo de Raadt
it might seem we can hoist the open above tame and then drop "rpath", but guenther found getprotobynumber can be called much later. ok guenther
2015-10-02update the -t args list; ok guentherJason McIntyre
2015-10-02Add ktracing of argv and envp to execve(2), with envp not traced by defaultPhilip Guenther
ok tedu@ deraadt@
2015-09-13Rename __sysctl syscall to just sysctl, as the userland wrapper is no longerPhilip Guenther
necessary ok deraadt@ jsing@
2015-09-11add some missing .Cm macros and drop some redundant .Bk while hereIngo Schwarze
2015-09-07Delete ktracing of context switches: it's unused, and not particularly useful,Philip Guenther
and doing VOP_WRITE() from inside tsleep/msleep makes the locking too complicated, making it harder to move forward on MP changes. ok deraadt@ kettenis@
2015-07-28Add ktracing of structs iovec, msghdr, and cmsghdr for {,p}{read,write}v(),Philip Guenther
sendmsg(), and recvmsg(). For cmsghdr, the len, level, and type are always shown, and for SOL_SOCKET,SCM_RIGHTS the fd numbers being passed are shown. ok millert@ deraadt@
2015-07-19Make KTR_SYSRET records variables variables sized, leaving out thePhilip Guenther
retval on error, including a long long retval on successful lseek(), and including a register_t retval for other successes. This fixes lseek reporting on ILP32 archs. While here, reworking internal kern_ktrace.c bits to be able to pass two buffers to ktrwriteraw(), so we can avoid mallocing a buffer in some cases and so that KTR_GENIO logs are split at PAGE_SIZE, not PAGE_SIZE-sizeof(struct ktrgenio) ok miod@
2015-07-19Figure out the tty width using TIOCGWINSZ early on. Will make tame(2)Theo de Raadt
integration easier in the future.
2015-05-17isatty() is used by stdio to determine the buffering mode. Add a F_ISATTYTheo de Raadt
option to fcntl(), so that isatty() can use this rather than than the bloated ioctl() interface. Reducing uses of ioctl() by libc makes it easier to constrain programs with various kinds of systrace sandboxes. ok guenther, previously discussed as a concept with nicm
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-17oops, started expecting sockoptlevelname() to handle two argumentsPhilip Guenther
but never actually did so. Fix that so that we stop losing the second argument to {get,set}sockopt(). Handling of levels other than SOL_SOCKET could be improved.
2015-04-17The first argument to socket/socketpair is an address family, not a protocolPhilip Guenther
family. (sysctl(3) is practically the only place where PF_* is correct)
2015-01-26Oops: symlinkat()'s 'atfd' argument is its second, not its firstPhilip Guenther
2015-01-18Eliminate a gcc warnings by not #defining _KERNEL when pulling inPhilip Guenther
<sys/socket.h>: it doesn't expose anything kdump cares about. Also, COMPAT_43 is dead warning noted by deraadt@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)