<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libsysdecode, branch release/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC r328033:</title>
<updated>2018-04-07T21:06:39+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T21:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2d18a3b12a9c2f351e830184b75b7b230dd55657'/>
<id>2d18a3b12a9c2f351e830184b75b7b230dd55657</id>
<content type='text'>
Bump date, which I missed in r328014. Thanks to jhb@ for reporting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bump date, which I missed in r328014. Thanks to jhb@ for reporting.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r328014:</title>
<updated>2018-04-07T21:04:43+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T21:04:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ecccab8667d01c7080cbdae735d489ec6dabbf9b'/>
<id>ecccab8667d01c7080cbdae735d489ec6dabbf9b</id>
<content type='text'>
Add support for decoding the nxt_flags, rcv_flags, and snd_flags of
SCTP level cmsgs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for decoding the nxt_flags, rcv_flags, and snd_flags of
SCTP level cmsgs.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r327995:</title>
<updated>2018-04-07T21:03:46+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T21:03:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=457fbffdff19c1f31f94be013aaa579c4ee2cd34'/>
<id>457fbffdff19c1f31f94be013aaa579c4ee2cd34</id>
<content type='text'>
Add support for decoding the type of a cmsg.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for decoding the type of a cmsg.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r327994:</title>
<updated>2018-04-07T21:02:42+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T21:02:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c120eec74af63eb060d9d69373fc251be298f627'/>
<id>c120eec74af63eb060d9d69373fc251be298f627</id>
<content type='text'>
Simplify table generation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify table generation.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r327966:</title>
<updated>2018-04-07T21:00:21+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T21:00:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f6c24bf5d6b3f404b77cade69834f957c57becf5'/>
<id>f6c24bf5d6b3f404b77cade69834f957c57becf5</id>
<content type='text'>
Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r327962:</title>
<updated>2018-04-07T20:57:27+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2018-04-07T20:57:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eb61af303a0adb97e3da93d34bccb1d3402a43cd'/>
<id>eb61af303a0adb97e3da93d34bccb1d3402a43cd</id>
<content type='text'>
Add support for the supported PR-SCTP policies.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for the supported PR-SCTP policies.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r326183:</title>
<updated>2018-03-19T06:55:26+00:00</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-19T06:55:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=af72a002ebfd0327778219f35c874986d60531e9'/>
<id>af72a002ebfd0327778219f35c874986d60531e9</id>
<content type='text'>
Add stdio.h to the synopsis for sysdecode functions that take a FILE *.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add stdio.h to the synopsis for sysdecode functions that take a FILE *.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC 326184: Decode kevent structures logged via ktrace(2) in kdump.</title>
<updated>2018-01-26T23:49:31+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-01-26T23:49:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1c8ecf1dcf40fd23c12052f8b943ab07d5f94263'/>
<id>1c8ecf1dcf40fd23c12052f8b943ab07d5f94263</id>
<content type='text'>
- Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of
  structures.

  The structure name in the record payload is preceded by a size_t
  containing the size of the individual structures.  Use this to
  replace the previous code that dumped the kevent arrays dumped for
  kevent().  kdump is now able to decode the kevent structures rather
  than dumping their contents via a hexdump.

  One change from before is that the 'changes' and 'events' arrays are
  not marked with separate 'read' and 'write' annotations in kdump
  output.  Instead, the first array is the 'changes' array, and the
  second array (only present if kevent doesn't fail with an error) is
  the 'events' array.  For kevent(), empty arrays are denoted by an
  entry with an array containing zero entries rather than no record.

- Move kevent decoding tables from truss to libsysdecode.

  This adds three new functions to decode members of struct kevent:
  sysdecode_kevent_filter, sysdecode_kevent_flags, and
  sysdecode_kevent_fflags.

  kdump uses these helper functions to pretty-print kevent fields.

- Move structure definitions for freebsd11 and freebsd32 kevent
  structures to &lt;sys/event.h&gt; so that they can be shared with userland.
  The 32-bit structures are only exposed if _WANT_KEVENT32 is defined.
  The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is
  defined.  The 32-bit freebsd11 structure requires both.

- Decode freebsd11 kevent structures in truss for the compat11.kevent()
  system call.

- Log 32-bit kevent structures via ktrace for 32-bit compat kevent()
  system calls.

- While here, constify the 'void *data' argument to ktrstruct().

Note that this version of the change for 11.x does not include freebsd11
kevent structures or _WANT_FREEBSD11_KEVENT.  It also does not include
the change to decode the compat11.kevent system call in truss.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of
  structures.

  The structure name in the record payload is preceded by a size_t
  containing the size of the individual structures.  Use this to
  replace the previous code that dumped the kevent arrays dumped for
  kevent().  kdump is now able to decode the kevent structures rather
  than dumping their contents via a hexdump.

  One change from before is that the 'changes' and 'events' arrays are
  not marked with separate 'read' and 'write' annotations in kdump
  output.  Instead, the first array is the 'changes' array, and the
  second array (only present if kevent doesn't fail with an error) is
  the 'events' array.  For kevent(), empty arrays are denoted by an
  entry with an array containing zero entries rather than no record.

- Move kevent decoding tables from truss to libsysdecode.

  This adds three new functions to decode members of struct kevent:
  sysdecode_kevent_filter, sysdecode_kevent_flags, and
  sysdecode_kevent_fflags.

  kdump uses these helper functions to pretty-print kevent fields.

- Move structure definitions for freebsd11 and freebsd32 kevent
  structures to &lt;sys/event.h&gt; so that they can be shared with userland.
  The 32-bit structures are only exposed if _WANT_KEVENT32 is defined.
  The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is
  defined.  The 32-bit freebsd11 structure requires both.

- Decode freebsd11 kevent structures in truss for the compat11.kevent()
  system call.

- Log 32-bit kevent structures via ktrace for 32-bit compat kevent()
  system calls.

- While here, constify the 'void *data' argument to ktrstruct().

Note that this version of the change for 11.x does not include freebsd11
kevent structures or _WANT_FREEBSD11_KEVENT.  It also does not include
the change to decode the compat11.kevent system call in truss.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r326282, r326317:</title>
<updated>2017-12-12T20:28:54+00:00</updated>
<author>
<name>Fedor Uporov</name>
<email>fsu@FreeBSD.org</email>
</author>
<published>2017-12-12T20:28:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=df20c958732e3cedc8598ab4d7f6a1a19667f51d'/>
<id>df20c958732e3cedc8598ab4d7f6a1a19667f51d</id>
<content type='text'>
Remap ENOATTR to ENODATA in the linuxulator.
In the linux ENOADATA is frequently #defined as ENOATTR.
The change is required for an xattrs support implementation.

Sync bsd_to_linux_errno[] table with i386 and amd64 tables in the sys directory.

Discussed with: netchild
Requested by: jhb
Approved by: pfg (mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remap ENOATTR to ENODATA in the linuxulator.
In the linux ENOADATA is frequently #defined as ENOATTR.
The change is required for an xattrs support implementation.

Sync bsd_to_linux_errno[] table with i386 and amd64 tables in the sys directory.

Discussed with: netchild
Requested by: jhb
Approved by: pfg (mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC 319493,319509,319520,319595,319677,319679-319681,319688,319689,</title>
<updated>2017-11-21T02:09:59+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2017-11-21T02:09:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b5ab9f077d9b851a5747e6e33222e07cc56c6204'/>
<id>b5ab9f077d9b851a5747e6e33222e07cc56c6204</id>
<content type='text'>
319761-319768,320010,322899,322959,323020,323021,323151:

Sync libsysdecode, kdump, and truss with head (aside from changes such
as ino64 that are not applicable to 11).

319493:
Decode the arguments passed to __cap_rights_get() and cap_rights_limit().

319509:
Decode the argument passed to cap_getmode().

The returned integer value is output.

319520:
Decode the 'who' argument passed to getrusage().

Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant
passed as the first argument to getrusage().  Use this function in both
kdump and truss to decode the first argument to getrusage().

319595:
Decode arguments to dup, dup2, getdirentries, pread, and pwrite.

- dup and dup2 print fd arguments in decimal.
- pread and pwrite are similar to read and write with the addition of the
  file offset.
- getdirentries displays the output entries as a string for now and also
  prints the value returned in *basep.  Eventually the buffer for
  getdirentries should perhaps be decoded as an array of dirent
  structures.

319677:
Decode arguments to ACL related system calls.

This only decodes the raw arguments but not the contents of the struct acl
objects.

319679:
Decode arguments passed to extended attribute related system calls.

The cmd argument passed to extattrctl() is not decoded as a string constant
but is just printed in hex.  The value is filesystem-specific but in
practice is only used with UFS1 filesystems.

319680:
Decode arguments to minherit().

319681:
Decode arguments to mlock(), mlockall(), and munlock().

319688:
Decode flags passed to mount(), nmount(), and unmount().

319689:
Decode arguments passed to msync().

319761:
Fix decoding of setpriority() arguments.

The PRIO_* 'which' value is stored in the first argument to setpriority(2),
not the last.  While here, decode the arguments to getpriority(2).

319762:
Decode arguments to getpriority() and setpriority().

319763:
Decode the arguments to ptrace().

This does not decode structures returned by ptrace().

319764:
Decode the arguments to quotactl().

319765:
Improve decoding of RB_AUTOBOOT in the 'howto' argument to reboot().

The reboot() system call accepts a mode (RB_AUTOBOOT, RB_HALT, RB_POWEROFF,
or RB_REROOT) as well as zero or more optional flags in 'howto'.
However, RB_AUTOBOOT was only displayed if 'howto' was exactly 0.
Combinations like 'RB_AUTOBOOT | RB_DUMP' were decoded as 'RB_DUMP'.
Instead, imply that RB_AUTOBOOT was specified if none of the other "mode"
flags were specified.

319766:
Decode the 'howto' argument to reboot().

319767:
Decode arguments to rtprio_thread() (same as rtprio()).

319768:
Decode arguments to rtprio() and rtprio_thread().

320010:
Decode arguments to sched_* family of system calls.

This includes decoding both scheduler policy constants and the sched_param
structure for sched_get_priority_max(), sched_get_priority_min(),
sched_getparam(), sched_getscheduler(), sched_rr_get_interval(),
sched_setparam(), and sched_setscheduler().

322899:
Decode arguments passed to thr_set_name().

322959:
Decode extra signal information for caught signals.

Decode fields from the siginfo_t stored in the PT_LWPINFO structure when a
signal is caught by a traced process.  This includes the signal code
(si_code) as well as additional members such as si_addr, si_pid, etc.

323020:
Trim stale prototype for ioctlname().

323021:
Decode signal information returned by system calls.

Specifically, decode the siginfo structure returned by sigtimedwait(),
sigwaitinfo(), and wait6().  While here, also decode the signal number
returned in the second argument to sigwait().

323151:
Decode pathconf() names, *at() flags, and sysarch() numbers in libsysdecode.

Move tables that were previously in truss over to libsysdecode.  truss
output is unchanged, but kdump has been updated to decode these fields.
In addition, sysdecode_sysarch_number() should support all platforms
whereas the old table in truss only supported x86.

PR:		214885, 215448
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
319761-319768,320010,322899,322959,323020,323021,323151:

Sync libsysdecode, kdump, and truss with head (aside from changes such
as ino64 that are not applicable to 11).

319493:
Decode the arguments passed to __cap_rights_get() and cap_rights_limit().

319509:
Decode the argument passed to cap_getmode().

The returned integer value is output.

319520:
Decode the 'who' argument passed to getrusage().

Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant
passed as the first argument to getrusage().  Use this function in both
kdump and truss to decode the first argument to getrusage().

319595:
Decode arguments to dup, dup2, getdirentries, pread, and pwrite.

- dup and dup2 print fd arguments in decimal.
- pread and pwrite are similar to read and write with the addition of the
  file offset.
- getdirentries displays the output entries as a string for now and also
  prints the value returned in *basep.  Eventually the buffer for
  getdirentries should perhaps be decoded as an array of dirent
  structures.

319677:
Decode arguments to ACL related system calls.

This only decodes the raw arguments but not the contents of the struct acl
objects.

319679:
Decode arguments passed to extended attribute related system calls.

The cmd argument passed to extattrctl() is not decoded as a string constant
but is just printed in hex.  The value is filesystem-specific but in
practice is only used with UFS1 filesystems.

319680:
Decode arguments to minherit().

319681:
Decode arguments to mlock(), mlockall(), and munlock().

319688:
Decode flags passed to mount(), nmount(), and unmount().

319689:
Decode arguments passed to msync().

319761:
Fix decoding of setpriority() arguments.

The PRIO_* 'which' value is stored in the first argument to setpriority(2),
not the last.  While here, decode the arguments to getpriority(2).

319762:
Decode arguments to getpriority() and setpriority().

319763:
Decode the arguments to ptrace().

This does not decode structures returned by ptrace().

319764:
Decode the arguments to quotactl().

319765:
Improve decoding of RB_AUTOBOOT in the 'howto' argument to reboot().

The reboot() system call accepts a mode (RB_AUTOBOOT, RB_HALT, RB_POWEROFF,
or RB_REROOT) as well as zero or more optional flags in 'howto'.
However, RB_AUTOBOOT was only displayed if 'howto' was exactly 0.
Combinations like 'RB_AUTOBOOT | RB_DUMP' were decoded as 'RB_DUMP'.
Instead, imply that RB_AUTOBOOT was specified if none of the other "mode"
flags were specified.

319766:
Decode the 'howto' argument to reboot().

319767:
Decode arguments to rtprio_thread() (same as rtprio()).

319768:
Decode arguments to rtprio() and rtprio_thread().

320010:
Decode arguments to sched_* family of system calls.

This includes decoding both scheduler policy constants and the sched_param
structure for sched_get_priority_max(), sched_get_priority_min(),
sched_getparam(), sched_getscheduler(), sched_rr_get_interval(),
sched_setparam(), and sched_setscheduler().

322899:
Decode arguments passed to thr_set_name().

322959:
Decode extra signal information for caught signals.

Decode fields from the siginfo_t stored in the PT_LWPINFO structure when a
signal is caught by a traced process.  This includes the signal code
(si_code) as well as additional members such as si_addr, si_pid, etc.

323020:
Trim stale prototype for ioctlname().

323021:
Decode signal information returned by system calls.

Specifically, decode the siginfo structure returned by sigtimedwait(),
sigwaitinfo(), and wait6().  While here, also decode the signal number
returned in the second argument to sigwait().

323151:
Decode pathconf() names, *at() flags, and sysarch() numbers in libsysdecode.

Move tables that were previously in truss over to libsysdecode.  truss
output is unchanged, but kdump has been updated to decode these fields.
In addition, sysdecode_sysarch_number() should support all platforms
whereas the old table in truss only supported x86.

PR:		214885, 215448
</pre>
</div>
</content>
</entry>
</feed>
