History log of /freebsd-11-stable/lib/libsysdecode/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
367457 07-Nov-2020 dim

MFC r344855 (by jhb):

Drop "All rights reserved" from my copyright statements.

Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D19485


/freebsd-11-stable/contrib/elftoolchain/libelf/gelf_mips64el.c
/freebsd-11-stable/lib/libdevctl/devctl.3
/freebsd-11-stable/lib/libdevctl/devctl.c
/freebsd-11-stable/lib/libdevctl/devctl.h
/freebsd-11-stable/lib/libkvm/kvm_aarch64.h
/freebsd-11-stable/lib/libkvm/kvm_amd64.h
/freebsd-11-stable/lib/libkvm/kvm_arm.h
/freebsd-11-stable/lib/libkvm/kvm_i386.h
/freebsd-11-stable/lib/libkvm/kvm_mips.h
/freebsd-11-stable/lib/libkvm/kvm_native.3
/freebsd-11-stable/lib/libkvm/kvm_sparc64.h
errno.c
signal.c
syscallnames.c
sysdecode.3
sysdecode.h
sysdecode_abi_to_freebsd_errno.3
sysdecode_cap_rights.3
sysdecode_enum.3
sysdecode_fcntl_arg.3
sysdecode_ioctlname.3
sysdecode_kevent.3
sysdecode_mask.3
sysdecode_quotactl_cmd.3
sysdecode_sigcode.3
sysdecode_socket_protocol.3
sysdecode_sockopt_name.3
sysdecode_syscallnames.3
sysdecode_utrace.3
/freebsd-11-stable/lib/libutil/kinfo_getvmobject.3
/freebsd-11-stable/sbin/hastd/refcnt.h
/freebsd-11-stable/share/man/man3/sigevent.3
/freebsd-11-stable/share/man/man4/ktr.4
/freebsd-11-stable/share/man/man4/witness.4
/freebsd-11-stable/share/man/man9/BUS_GET_CPUS.9
/freebsd-11-stable/share/man/man9/BUS_RESCAN.9
/freebsd-11-stable/share/man/man9/atomic.9
/freebsd-11-stable/share/man/man9/bus_map_resource.9
/freebsd-11-stable/share/man/man9/critical_enter.9
/freebsd-11-stable/share/man/man9/ithread.9
/freebsd-11-stable/share/man/man9/ktr.9
/freebsd-11-stable/share/man/man9/runqueue.9
/freebsd-11-stable/share/man/man9/scheduler.9
/freebsd-11-stable/share/man/man9/sleepqueue.9
/freebsd-11-stable/share/man/man9/swi.9
/freebsd-11-stable/stand/efi/libefi/devpath.c
/freebsd-11-stable/stand/i386/cdboot/cdboot.S
/freebsd-11-stable/stand/i386/libi386/pxe.c
/freebsd-11-stable/stand/i386/libi386/pxe.h
/freebsd-11-stable/stand/i386/pxeldr/pxeldr.S
/freebsd-11-stable/sys/amd64/include/intr_machdep.h
/freebsd-11-stable/sys/arm/arm/ptrace_machdep.c
/freebsd-11-stable/sys/dev/acpica/acpi_isab.c
/freebsd-11-stable/sys/dev/acpica/acpi_pcivar.h
/freebsd-11-stable/sys/dev/pci/vga_pci.c
/freebsd-11-stable/sys/dev/rc/rc.c
/freebsd-11-stable/sys/dev/rc/rcreg.h
/freebsd-11-stable/sys/i386/pci/pci_pir.c
/freebsd-11-stable/sys/kern/kern_ktr.c
/freebsd-11-stable/sys/kern/kern_rwlock.c
/freebsd-11-stable/sys/kern/subr_lock.c
/freebsd-11-stable/sys/kern/subr_sleepqueue.c
/freebsd-11-stable/sys/kern/subr_smp.c
/freebsd-11-stable/sys/sys/_rwlock.h
/freebsd-11-stable/sys/sys/refcount.h
/freebsd-11-stable/sys/sys/rwlock.h
/freebsd-11-stable/sys/sys/sleepqueue.h
/freebsd-11-stable/sys/sys/turnstile.h
/freebsd-11-stable/sys/x86/acpica/madt.c
/freebsd-11-stable/sys/x86/include/apicvar.h
/freebsd-11-stable/sys/x86/include/intr_machdep.h
/freebsd-11-stable/sys/x86/isa/atpic.c
/freebsd-11-stable/sys/x86/isa/elcr.c
/freebsd-11-stable/sys/x86/x86/intr_machdep.c
/freebsd-11-stable/sys/x86/x86/io_apic.c
/freebsd-11-stable/sys/x86/x86/local_apic.c
/freebsd-11-stable/sys/x86/x86/mptable.c
/freebsd-11-stable/sys/x86/x86/mptable_pci.c
/freebsd-11-stable/sys/x86/xen/pvcpu_enum.c
/freebsd-11-stable/tests/sys/capsicum/ioctls_test.c
/freebsd-11-stable/tests/sys/kern/ptrace_test.c
/freebsd-11-stable/tools/tools/decioctl/decioctl.c
/freebsd-11-stable/usr.sbin/devctl/devctl.8
/freebsd-11-stable/usr.sbin/devctl/devctl.c
361020 13-May-2020 jhb

MFC 359047,359054: Deprecate procfs-based process debugging.

359047:
Mark procfs-based process debugging as deprecated for FreeBSD 13.

Attempting to use ioctls on /proc/<pid>/mem to control a process will
trigger warnings on the console. The <sys/pioctl.h> include file will
also now emit a compile-time warning when used from userland.

359054:
Fix the workaround to ignore the #warning for GCC.

clang and gcc use different warning flags for #warning preprocessor
directives.

For both 12 and 11, adjust the GCC warning flags to only be added in
4.7 and later since 4.2.1 does not support -Wno-cpp. For 11, add the
needed warning suppression to procctl's build. procctl was removed in
12.0.

351891 05-Sep-2019 bdrewery

MFC r339635,r350301,r350327,r351151:

r339635:
Fix regex for extracting SHM_* values for libsysdecode
r350301:
libsysdecode: add explicit dependencies on recently changed headers
r350327:
libsysdecode: use the proper include directory
r351151:
Rework r339635 to fix .depend.tables.h handling.

346827 28-Apr-2019 dchagin

MFC r331356 (by emaste@):

Share Linux errno table with libsysdecode.

346823 28-Apr-2019 dchagin

MFC r331056:
Share a single bsd-linux errno table across MD consumers

Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table. Move the table to a common
file to be used by all. Make it 'const int' to place it in .rodata.

(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)

This change should introduce no functional change; a followup will add
missing errno values.

MFC r331057:
linux_errno.c: add newer errno values

Also introduce a static assert to ensure the list is kept up to date.

MFC r331060:
Chase r331057 in libsysdecode erno table

340056 02-Nov-2018 bz

MFC r330795:

The vmresult table was missing most of the values apart from two due to
extra "_" in the names we grep for. Add the "_" to the pattern.

Reviewed by: jhb
Sponsored by: iXsystems, Inc.

332250 07-Apr-2018 tuexen

MFC r328033:

Bump date, which I missed in r328014. Thanks to jhb@ for reporting.

332248 07-Apr-2018 tuexen

MFC r328014:

Add support for decoding the nxt_flags, rcv_flags, and snd_flags of
SCTP level cmsgs.

332247 07-Apr-2018 tuexen

MFC r327995:

Add support for decoding the type of a cmsg.

332246 07-Apr-2018 tuexen

MFC r327994:

Simplify table generation.

332244 07-Apr-2018 tuexen

MFC r327966:

Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo.

332243 07-Apr-2018 tuexen

MFC r327962:

Add support for the supported PR-SCTP policies.

331187 19-Mar-2018 eadler

MFC r326183:

Add stdio.h to the synopsis for sysdecode functions that take a FILE *.

328454 26-Jan-2018 jhb

MFC 326184: Decode kevent structures logged via ktrace(2) in kdump.

- 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 <sys/event.h> 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.

326810 12-Dec-2017 fsu

MFC r326282, r326317:
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)

326044 21-Nov-2017 jhb

MFC 319493,319509,319520,319595,319677,319679-319681,319688,319689,
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

325902 16-Nov-2017 jhb

MFC 319517: Add a cross-reference to sysdecode_socket_protocol(3).

324398 07-Oct-2017 emaste

MFC r323675: libsysdecode: report invalid cap_rights_t

Previously we'd have an assertion failure in cap_rights_is_set if
sysdecode_cap_rights is called with an invalid cap_rights_t, so test for
validity first.

PR: 222258
Sponsored by: The FreeBSD Foundation

321687 29-Jul-2017 kp

MFC r321370

Handle WITH/WITHOUT_PF in libsysdecode

Only filter out the PF ioctls if we're building without pf support.
Until now those were always filtered out, so truss did not show symbolic
names for pf ioctls.

Differential Revision: https://reviews.freebsd.org/D11629

320299 23-Jun-2017 bdrewery

MFC r320206,r320207:

r320206:
Follow-up r308602: Don't add missing headers to .depend.tables.h.
r320207:
Tweak r320206: Still create the TABLE but not the .depend entry for missing
headers.

Approved by: re (gjb)

319417 01-Jun-2017 tuexen

MFC r317730:
Add support for listen() call.

MFC r317731:
Add Socklent for handling args of type socklen_t.

MFC r317732:
Decode the third argument of socket().

MFC r317736:
Add support for [gs]etsockopt().

MFC r317737:
Decode the fourth argument of sendto and recvfrom call.

MFC r317739:
Add support for sendmsg() and recvmsg().

MFC r317747:
Add support for socket option names related to the IPPROTO_SCTP level.

MFC r317748:
Add support for socket option names related to the IPPROTO_IPV6 level.

MFC r317750:
Add support for sctp_generic_sendmsg() and sctp_generic_recvmsg().

MFC r317789:
Add support for socket option names related to the level IPPROTO_UDPLITE.

MFC r318879:
Improve the decoding of the third argument of the socket() call.

Decoding of the third argument depends on the first one. For doing this,
add a corresponding function to libsysdecode.

Thanks to jhb@ for suggesting this.

318770 24-May-2017 jhb

MFC 315310: Spell "const" properly.

PR: 217797

318764 24-May-2017 jhb

MFC 315283:
Fix sysdecode_cap_rights which currently prints bogus capability rights.

PR: 217787

315855 23-Mar-2017 smh

MFC r315423:

Fix libsysdecode vmprot flag decoding

Sponsored by: Multiplay

313567 10-Feb-2017 jhb

MFC 311568,311584,312387:
Set MORETOCOME for AIO write requests on a socket.

311568:
Set MORETOCOME for AIO write requests on a socket.

Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend*
set PRUS_MOREOTOCOME when invoking the protocol send method. The aio
worker tasks for sending on a socket set this flag when there are
additional write jobs waiting on the socket buffer.

311584:
Unbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag
in msgflags

(Actually, this change excludes MSG_MORETOCOME from being decoded)

312387:
Fix regression from r311568: collision of MSG_NOSIGNAL with MSG_MORETOCOME
lead to delayed send of data sent with sendto(MSG_NOSIGNAL).

Sponsored by: Chelsio Communications

313538 10-Feb-2017 ngie

MFC r312452-r312512:

r312452-r312512:

- Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

- Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc


/freebsd-11-stable/lib/csu/aarch64/Makefile
/freebsd-11-stable/lib/csu/amd64/Makefile
/freebsd-11-stable/lib/csu/arm/Makefile
/freebsd-11-stable/lib/csu/i386/Makefile
/freebsd-11-stable/lib/csu/mips/Makefile
/freebsd-11-stable/lib/csu/powerpc/Makefile
/freebsd-11-stable/lib/csu/powerpc64/Makefile
/freebsd-11-stable/lib/csu/riscv/Makefile
/freebsd-11-stable/lib/csu/sparc64/Makefile
/freebsd-11-stable/lib/libalias/libalias/Makefile
/freebsd-11-stable/lib/libalias/modules/Makefile
/freebsd-11-stable/lib/libalias/modules/Makefile.inc
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libauditd/Makefile
/freebsd-11-stable/lib/libbegemot/Makefile
/freebsd-11-stable/lib/libblocksruntime/Makefile
/freebsd-11-stable/lib/libbluetooth/Makefile
/freebsd-11-stable/lib/libbsm/Makefile
/freebsd-11-stable/lib/libbsnmp/libbsnmp/Makefile
/freebsd-11-stable/lib/libbz2/Makefile
/freebsd-11-stable/lib/libc++/Makefile
/freebsd-11-stable/lib/libc_nonshared/Makefile
/freebsd-11-stable/lib/libcam/Makefile
/freebsd-11-stable/lib/libcom_err/Makefile
/freebsd-11-stable/lib/libcompat/Makefile
/freebsd-11-stable/lib/libcrypt/Makefile
/freebsd-11-stable/lib/libcxxrt/Makefile
/freebsd-11-stable/lib/libdevdctl/tests/Makefile
/freebsd-11-stable/lib/libdwarf/Makefile
/freebsd-11-stable/lib/libelf/Makefile
/freebsd-11-stable/lib/libevent/Makefile
/freebsd-11-stable/lib/libexecinfo/Makefile
/freebsd-11-stable/lib/libexpat/Makefile
/freebsd-11-stable/lib/libgssapi/Makefile
/freebsd-11-stable/lib/libiconv_modules/Makefile.inc
/freebsd-11-stable/lib/libiconv_modules/mapper_parallel/Makefile
/freebsd-11-stable/lib/libkiconv/Makefile
/freebsd-11-stable/lib/libldns/Makefile
/freebsd-11-stable/lib/liblzma/Makefile
/freebsd-11-stable/lib/libmagic/Makefile
/freebsd-11-stable/lib/libmd/Makefile
/freebsd-11-stable/lib/libmilter/Makefile
/freebsd-11-stable/lib/libmp/Makefile
/freebsd-11-stable/lib/libngatm/Makefile
/freebsd-11-stable/lib/libnv/Makefile
/freebsd-11-stable/lib/libopie/Makefile
/freebsd-11-stable/lib/libpam/libpam/Makefile
/freebsd-11-stable/lib/libpam/modules/Makefile.inc
/freebsd-11-stable/lib/libpam/modules/pam_passwdqc/Makefile
/freebsd-11-stable/lib/libpam/modules/pam_ssh/Makefile
/freebsd-11-stable/lib/libpam/static_libpam/Makefile
/freebsd-11-stable/lib/libpcap/Makefile
/freebsd-11-stable/lib/libpe/Makefile
/freebsd-11-stable/lib/libproc/Makefile
/freebsd-11-stable/lib/libprocstat/zfs/Makefile
/freebsd-11-stable/lib/librpcsec_gss/Makefile
/freebsd-11-stable/lib/librpcsvc/Makefile
/freebsd-11-stable/lib/librt/Makefile
/freebsd-11-stable/lib/libsbuf/Makefile
/freebsd-11-stable/lib/libsm/Makefile
/freebsd-11-stable/lib/libsmb/Makefile
/freebsd-11-stable/lib/libsmdb/Makefile
/freebsd-11-stable/lib/libsmutil/Makefile
/freebsd-11-stable/lib/libsqlite3/Makefile
/freebsd-11-stable/lib/libstdthreads/Makefile
Makefile
/freebsd-11-stable/lib/libtelnet/Makefile
/freebsd-11-stable/lib/libthr/Makefile
/freebsd-11-stable/lib/libthr/support/Makefile.inc
/freebsd-11-stable/lib/libthread_db/Makefile
/freebsd-11-stable/lib/libufs/Makefile
/freebsd-11-stable/lib/libulog/Makefile
/freebsd-11-stable/lib/libunbound/Makefile
/freebsd-11-stable/lib/libutil/Makefile
/freebsd-11-stable/lib/libypclnt/Makefile
/freebsd-11-stable/lib/ncurses/config.mk
/freebsd-11-stable/lib/ncurses/form/Makefile
/freebsd-11-stable/lib/ncurses/formw/Makefile
/freebsd-11-stable/lib/ncurses/menu/Makefile
/freebsd-11-stable/lib/ncurses/menuw/Makefile
/freebsd-11-stable/lib/ncurses/ncurses/Makefile
/freebsd-11-stable/lib/ncurses/ncursesw/Makefile
/freebsd-11-stable/lib/ncurses/panel/Makefile
/freebsd-11-stable/lib/ncurses/panelw/Makefile
311999 12-Jan-2017 jhb

MFC 307538,307948,308602,308603,311151: Move kdump's mksubr into libsysdecode.

307538:
Move mksubr from kdump into libsysdecode.

Restructure this script so that it generates a header of tables instead
of a source file. The tables are included in a flags.c source file which
provides functions to decode various system call arguments.

For functions that decode an enumeration, the function returns a pointer
to a string for known values and NULL for unknown values.

For functions that do more complex decoding (typically of a bitmask), the
function accepts a pointer to a FILE object (open_memstream() can be used
as a string builder) to which decoded values are written. If the
function operates on a bitmask, the function returns true if any bits
were decoded or false if the entire value was valid. Additionally, the
third argument accepts a pointer to a value to which any undecoded bits
are stored. This pointer can be NULL if the caller doesn't care about
remaining bits.

Convert kdump over to using decoder functions from libsysdecode instead of
mksubr. truss also uses decoders from libsysdecode instead of private
lookup tables, though lookup tables for objects not decoded by kdump remain
in truss for now. Eventually most of these tables should move into
libsysdecode as the automated table generation approach from mksubr is
less stale than the static tables in truss.

Some changes have been made to truss and kdump output:
- The flags passed to open() are now properly decoded in that one of
O_RDONLY, O_RDWR, O_WRONLY, or O_EXEC is always included in a decoded
mask.
- Optional arguments to open(), openat(), and fcntl() are only printed
in kdump if they exist (e.g. the mode is only printed for open() if
O_CREAT is set in the flags).
- Print argument to F_GETLK/SETLK/SETLKW in kdump as a pointer, not int.
- Include all procctl() commands.
- Correctly decode pipe2() flags in truss by not assuming full
open()-like flags with O_RDONLY, etc.
- Decode file flags passed to *chflags() as file flags (UF_* and SF_*)
rather than as a file mode.
- Fix decoding of quotactl() commands by splitting out the two command
components instead of assuming the raw command value matches the
primary command component.

In addition, truss and kdump now build without triggering any warnings.
All of the sysdecode manpages now include the required headers in the
synopsis.

307948:
Use binary and (&) instead of logical to extract the mask of a capability.

308602:
Generate and use a proper .depend file for tables.h.

308603:
Move libsysdecode-specific hack out of buildworld.

This should fix the lib32 build since it was not removing the generated
ioctl.c. This file is generated by a find(1) call, so cannot use normal
dependency tracking methods.

311151:
Update libsysdecode for getfsstat() 'flags' argument changing to 'mode'.

As a followup to r310638, update libsysdecode (and kdump) to decode the
'mode' argument to getfsstat(). sysdecode_getfsstat_flags() has been
renamed to sysdecode_getfsstat_mode() and now treats the argument as an
enumerated value rather than a mask of flags.


/freebsd-11-stable/Makefile.inc1
/freebsd-11-stable/ObsoleteFiles.inc
Makefile
errno.c
flags.c
mkioctls
mktables
signal.c
syscallnames.c
sysdecode.3
sysdecode.h
sysdecode_abi_to_freebsd_errno.3
sysdecode_cap_rights.3
sysdecode_enum.3
sysdecode_fcntl_arg.3
sysdecode_ioctlname.3
sysdecode_mask.3
sysdecode_quotactl_cmd.3
sysdecode_sigcode.3
sysdecode_sockopt_name.3
sysdecode_syscallnames.3
sysdecode_utrace.3
utrace.c
/freebsd-11-stable/usr.bin/kdump/Makefile
/freebsd-11-stable/usr.bin/kdump/kdump.c
/freebsd-11-stable/usr.bin/kdump/mksubr
/freebsd-11-stable/usr.bin/truss/Makefile
/freebsd-11-stable/usr.bin/truss/aarch64-cloudabi64.c
/freebsd-11-stable/usr.bin/truss/aarch64-freebsd.c
/freebsd-11-stable/usr.bin/truss/amd64-cloudabi64.c
/freebsd-11-stable/usr.bin/truss/amd64-freebsd.c
/freebsd-11-stable/usr.bin/truss/amd64-freebsd32.c
/freebsd-11-stable/usr.bin/truss/amd64-linux.c
/freebsd-11-stable/usr.bin/truss/amd64-linux32.c
/freebsd-11-stable/usr.bin/truss/arm-freebsd.c
/freebsd-11-stable/usr.bin/truss/extern.h
/freebsd-11-stable/usr.bin/truss/i386-freebsd.c
/freebsd-11-stable/usr.bin/truss/i386-linux.c
/freebsd-11-stable/usr.bin/truss/main.c
/freebsd-11-stable/usr.bin/truss/mips-freebsd.c
/freebsd-11-stable/usr.bin/truss/powerpc-freebsd.c
/freebsd-11-stable/usr.bin/truss/powerpc64-freebsd.c
/freebsd-11-stable/usr.bin/truss/powerpc64-freebsd32.c
/freebsd-11-stable/usr.bin/truss/setup.c
/freebsd-11-stable/usr.bin/truss/sparc64-freebsd.c
/freebsd-11-stable/usr.bin/truss/syscall.h
/freebsd-11-stable/usr.bin/truss/syscalls.c
311198 03-Jan-2017 bdrewery

Revert MFC of r308603.

This depends on unmerged r307538 still.

311197 03-Jan-2017 bdrewery

MFC r308603:

Move libsysdecode-specific hack out of buildworld.

304453 19-Aug-2016 kib

MFC r304016:
Move defines common between rtld and libsysdecode into the header.

304450 19-Aug-2016 kib

MFC r303991:
Decode 32bit utrace records on the 64bit host.

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
298107 16-Apr-2016 gjb

Merge the projects/release-pkg branch to head.

This allows packaging the base system with pkg(8), including
but not limited to providing the ability to provide upstream
binary update possibilities for non-tier-1 architectures.

This merge is a requirement of the 11.0-RELEASE, and as such,
thank you to everyone that has tested the project branch.

Documentation in build(7) etc. is still somewhat sparse, but
updates to those parts will follow.

Sponsored by: The FreeBSD Foundation


297247 24-Mar-2016 ed

Replace the CloudABI system call table by a machine generated version.

The type definitions and constants that were used by COMPAT_CLOUDABI64
are a literal copy of some headers stored inside of CloudABI's C
library, cloudlibc. What is annoying is that we can't make use of
cloudlibc's system call list, as the format is completely different and
doesn't provide enough information. It had to be synced in manually.

We recently decided to solve this (and some other problems) by moving
the ABI definitions into a separate file:

https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt

This file is processed by a pile of Python scripts to generate the
header files like before, documentation (markdown), but in our case more
importantly: a FreeBSD system call table.

This change discards the old files in sys/contrib/cloudabi and replaces
them by the latest copies, which requires some minor changes here and
there. Because cloudabi.txt also enforces consistent names of the system
call arguments, we have to patch up a small number of system call
implementations to use the new argument names.

The new header files can also be included directly in FreeBSD kernel
space without needing any includes/defines, so we can now remove
cloudabi_syscalldefs.h and cloudabi64_syscalldefs.h. Patch up the
sources to include the definitions directly from sys/contrib/cloudabi
instead.


296211 29-Feb-2016 trasz

errno(3) -> errno(2)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


295989 24-Feb-2016 bdrewery

DIRDEPS_BUILD: Regenerate without local dependencies.

These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by: EMC / Isilon Storage Division


295931 23-Feb-2016 jhb

Add handling for non-native error values to libsysdecode.

Add two new functions, sysdecode_abi_to_freebsd_errno() and
sysdecode_freebsd_to_abi_errno(), which convert errno values between
the native FreeBSD ABI and other supported ABIs. Note that the
mappings are not necessarily perfect meaning in some cases multiple
errors in one ABI might map to a single error in another ABI. In that
case, the reverse mapping will return one of the errors that maps, but
which error is non-deterministic.

Change truss to always report the raw error value to the user but
use libsysdecode to map it to a native errno value that can be used
with strerror() to generate a description. Previously truss reported
the "converted" error value. Now the user will always see the exact
error value that the application sees.

Change kdump to report the truly raw error value to the user. Previously
kdump would report the absolute value of the raw error value (so for
Linux binaries it didn't output the FreeBSD error value, but the positive
value of the Linux error). Now it reports the real (i.e. negative) error
value for Linux binaries. Also, use libsysdecode to convert the native
FreeBSD error reported in the ktrace record to the raw error used by the
ABI. This means that the Linux ABI can now be handled directly in
ktrsysret() and removes the need for linux_ktrsysret().

Reviewed by: bdrewery, kib
Helpful notes: wblock (manpage)
Differential Revision: https://reviews.freebsd.org/D5314


295056 30-Jan-2016 jhb

Add a SYSDECODE_ABI_ prefix to the ABI enums to avoid potential collisions.

Suggested by: jmallett
Reviewed by: bdrewery, jmallett
Differential Revision: https://reviews.freebsd.org/D5123


294849 26-Jan-2016 jhb

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


293287 07-Jan-2016 bdrewery

Add in DIRDEPS_BUILD support.

Sponsored by: EMC / Isilon Storage Division


292622 22-Dec-2015 jhb

Move the mkioctls script to libsysdecode and use it to generate a
sysdecode_ioctlname() function. This function matches the behavior
of the truss variant in that it returns a pointer to a string description
for known ioctls. The caller is responsible for displaying unknown
ioctl requests. For kdump this meant moving the logic to handle unknown
ioctl requests out of the generated function and into an ioctlname()
function in kdump.c instead.

Differential Revision: https://reviews.freebsd.org/D4610


292236 15-Dec-2015 jhb

Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments. Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it. One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events. This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events. Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D4537