OpenBSD CVS

CVS log for src/usr.bin/kdump/mksubr


[BACK] Up to [local] / src / usr.bin / kdump

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Sun Aug 13 08:29:28 2023 UTC (9 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.39: +24 -1 lines
Diff to previous 1.39 (colored)

kevent: Add precision and abstimer flags for EVFILT_TIMER

Add timer precision flags NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS
and NOTE_NSECONDS for EVFILT_TIMER. Also, add an initial implementation
of NOTE_ABSTIME timers.

Similar kevent(2) flags exist on FreeBSD, NetBSD and XNU.

Initial diff by and OK aisha@
OK mpi@

Revision 1.39 / (download) - annotate - [select for diffs], Mon Dec 19 22:55:12 2022 UTC (16 months, 4 weeks ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored)

Improve reporting of waitid(2)'s idtype/id and options arguments
Add mimmutable(2) to report like munmap(2)

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 22 17:35:01 2022 UTC (2 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.37: +1 -2 lines
Diff to previous 1.37 (colored)

MAXCOMLEN is no longer needed in these programs, so remove the annotation
from sys/param.h include lines, or remove the include lines entirely if
it this was the least requirement.
ok millert

Revision 1.37 / (download) - annotate - [select for diffs], Fri Sep 17 15:13:50 2021 UTC (2 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.36: +5 -4 lines
Diff to previous 1.36 (colored)

sys/param.h is only needed for MAXCOMLEN, but a few header files
which must be manually included in userland were missing

Revision 1.36 / (download) - annotate - [select for diffs], Mon Nov 5 17:05:50 2018 UTC (5 years, 6 months ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.35: +2 -1 lines
Diff to previous 1.35 (colored)

trace struct flock; ok visa@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Feb 14 17:26:56 2018 UTC (6 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Zero as (un)mount flag is valid; ok millert@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Feb 11 18:45:51 2018 UTC (6 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

fix madvise(2) flags matching; ok deraadt@ tom@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 29 15:53:44 2017 UTC (6 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.32: +13 -6 lines
Diff to previous 1.32 (colored)

fcntl(F_GETOWN) doesn't have an argument, so don't display it.  While
here, make it easier to extend the set of such fcntl() commands

ok deraadt@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Apr 28 13:53:05 2017 UTC (7 years ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

Display futex(2) operations and arguments.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 7 06:12:37 2016 UTC (7 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

ktrace support for pollfd[] arrays
ok guenther

Revision 1.30 / (download) - annotate - [select for diffs], Tue Mar 22 16:45:07 2016 UTC (8 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.29: +3 -1 lines
Diff to previous 1.29 (colored)

Format the flags argument to sendsyslog()

ok deraadt@ bluhm@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 14 05:27:42 2016 UTC (8 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.28: +53 -1 lines
Diff to previous 1.28 (colored)

Display struct event more like other structs: show all members and use cpp
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@

Revision 1.28 / (download) - annotate - [select for diffs], Sun May 17 01:22:01 2015 UTC (9 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

isatty() is used by stdio to determine the buffering mode.  Add a F_ISATTY
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

Revision 1.27 / (download) - annotate - [select for diffs], Fri Apr 17 06:14:36 2015 UTC (9 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

The first argument to socket/socketpair is an address family, not a protocol
family.  (sysctl(3) is practically the only place where PF_* is correct)

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jan 18 20:05:20 2015 UTC (9 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.25: +1 -4 lines
Diff to previous 1.25 (colored)

Eliminate a gcc warnings by not #defining _KERNEL when pulling in
<sys/socket.h>: it doesn't expose anything kdump cares about.
Also, COMPAT_43 is dead

warning noted by deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 11 05:44:12 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)

Make quotactlcmd formatting consistent with others
Fix some indentation in the generated .c file

Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 8 21:23:44 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
Changes since 1.23: +25 -28 lines
Diff to previous 1.23 (colored)

Convert syscall argument handling from a giant switch to a giant table.
While at it, use formatters for fds, counts, ids of all types, and "small
buffer sizes" that always show them in decimal, while paths, pointers, and
"big buffer sizes" get formatters that always show them in hex.  The -d
option only affects args when the -n option is used or for unknown syscalls,
as well as syscall return values, and unrecognized ioctls.

ok otto@ millert@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 13 03:46:33 2014 UTC (9 years, 7 months ago) by guenther
Branch: MAIN
Changes since 1.22: +20 -2 lines
Diff to previous 1.22 (colored)

Add dumping of struct dqblk done by quotactl(2)

ok millert@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Sep 17 19:12:55 2014 UTC (9 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.21: +86 -19 lines
Diff to previous 1.21 (colored)

Add display of the flags to pipe2, dup3, and accept4, display of
MSG_CMSG_CLOEXEC in recvmsg, and display of SOCK_{CLOEXEC,NONBLOCK}
in socket and socketpair.
Do _not_ display the O_ACCMODE bits in the arg to fcntl(F_SETFD)

ok miod@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Aug 17 22:43:07 2014 UTC (9 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.20: +6 -4 lines
Diff to previous 1.20 (colored)

Use %#o instead of %#x for mode_t

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jul 2 06:32:07 2014 UTC (9 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

properly process minherit(2) flags; ok guenther@ matthew@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 27 20:50:43 2014 UTC (9 years, 10 months ago) by matthew
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

Cleanup support for legacy mmap flags

Move all legacy MAP_FOO values behind #ifndef _KERNEL and redefine
them to either be aliases for existing flags (e.g., MAP_COPY ->
MAP_PRIVATE) or 0.

Also, add MAP_OLDFOO defines (behind #ifndef _KERNEL) so the kernel
and kdump can remain compatible with current OpenBSD binaries.

ok deraadt

Revision 1.18 / (download) - annotate - [select for diffs], Sat Dec 21 07:32:35 2013 UTC (10 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.17: +5 -1 lines
Diff to previous 1.17 (colored)

Recognize itimer and ktrace facility names to {get,set}itimer() and ktrace()

ok otto@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jul 3 23:04:34 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.16: +1 -181 lines
Diff to previous 1.16 (colored)

For consistency, move the functions that aren't generated at build-time
from mksubr to kdump.c

ok otto@ millert@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jul 1 17:16:46 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Tweak regexp so that RUSAGE_CHILDREN will be matched and displayed

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 17 19:11:54 2013 UTC (10 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.14: +10 -2 lines
Diff to previous 1.14 (colored)

Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.

Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@

Revision 1.14 / (download) - annotate - [select for diffs], Tue Dec 25 09:35:51 2012 UTC (11 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.13: +14 -7 lines
Diff to previous 1.13 (colored)

Report macro names for the second argument to shutdown(), getrusage(),
pathconf(), and fpathconf(), and for poll()'s INFTIM.
When open()'s flag arg doesn't include O_CREAT, don't show the third argument
unless th e-n option is given.  Ditto for fcntl()'s F_GETFD and F_GETFL ops.
Show sysctl()'s KERN_PROC_KTHREAD as "kthread".

ok otto@

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jul 21 07:16:03 2012 UTC (11 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Make kdump recognize the __MAP_NOREPLACE flag.

ok deraadt

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jul 8 10:23:36 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.11: +54 -3 lines
Diff to previous 1.11 (colored)

Handle the O_ACCMODE bits correctly, so that O_RDONLY is displayed
even when other flag bits are set

ok otto@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 20 07:30:01 2012 UTC (11 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

CLOCK_* moved from sys/time.h to sys/_time.h

ok otto@ kettenis@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Apr 12 12:33:04 2012 UTC (12 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)

remove rfork(); ok guenther miod

Revision 1.9 / (download) - annotate - [select for diffs], Mon Mar 19 09:05:39 2012 UTC (12 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Add tracing and dumping of "pointer to struct" syscall arguments for
structs timespec, timeval, sigaction, and rlimit.

ok otto@ jsing@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Feb 20 21:04:35 2012 UTC (12 years, 3 months ago) by guenther
Branch: MAIN
Changes since 1.7: +75 -6 lines
Diff to previous 1.7 (colored)

- add more ptrace() ops
- be robust against a ktrace file the contains a record with
  ktr_len==SIZE_MAX, instead of reallocating its buffer to zero size
- format the clockid_t argument to clock_*() and __thrsleep() as CLOCK_*
- format the sigset_t argument to sigprocmask() and __thrsigdivert(), the
  return from sigprocmask(), and the mask reported for PSIG records
  as a bitset of SIG* values, except that if most the bits are set
  then invert it and prefix with '~'
- show the next level of the kern.proc sysctl
- __tfork() creates procs, so do the mappidtoemul() handling
- refactor ktrstat()'s time printing bits and fix a whitespace glitch
  in its output
- reduce stack usage in ktrstruct()
- a value of zero is not an error for mode bits (S_*), atflag bits
  (AT_*), wait options (W*), or shmat flags (SHM_*)

ok otto@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 19 22:00:37 2011 UTC (12 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.6: +8 -1 lines
Diff to previous 1.6 (colored)

teach kdump about "siginfo-style" signal sub-codes, and the (currently)
limited subset of information the kernel supplies.
ok miod pirofti

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 19 18:20:12 2011 UTC (12 years, 10 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Add fancy kdump support for the openat(2) system calls.

ok otto@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 8 19:29:44 2011 UTC (12 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Support sending struct info to kdump. So far for struct stat and
struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jul 4 06:44:52 2011 UTC (12 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

Big restructuring of the main switch making it much more readable.
Also, handle offset_t (long long) args and padding in a consistent manner.
ok deraadt@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 20 17:54:48 2011 UTC (12 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.2: +15 -15 lines
Diff to previous 1.2 (colored)

more fancy kdump output, mostly from FreeBSD; ok deraadt@ tedu@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 16 17:08:59 2011 UTC (12 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.1: +44 -60 lines
Diff to previous 1.1 (colored)

Local changes to make this work on OpenBSD. Not used functions disabled for
now.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 16 17:05:38 2011 UTC (12 years, 11 months ago) by otto
Branch: MAIN

mksubr from freebsd, to be used to generate flags to name translation
for kdump.  Added missing license to the file, with the kind
permission of the author David Kirchner. Not used yet. ok miod@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.