- 22 Jun, 2022 5 commits
-
-
Dmitry Chagin authored
MFC after: 2 weeks
-
Dmitry Chagin authored
Reviewed by: jhb (previous version, without truss) Differential revision: https://reviews.freebsd.org/D35231 MFC after: 2 weeks
-
Dmitry Chagin authored
Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35153 MFC after: 2 weeks
-
Dmitry Chagin authored
Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35216 MFC after: 2 weeks
-
Dmitry Chagin authored
Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35356 MFC after: 2 weeks
-
- 11 May, 2022 1 commit
-
-
Dmitry Chagin authored
Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D34982 MFC after: 2 weeks
-
- 03 Mar, 2022 1 commit
-
-
Mateusz Guzik authored
For compatibility with Linux. MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D34424
-
- 15 Nov, 2021 1 commit
-
-
Brooks Davis authored
Rename to match the naming of syscalls and allow 32 to be appended without making an ugly name like kevent_freebsd1132. While here, make the kevent changelist argument const. Reviewed by: kib
-
- 21 Sep, 2021 1 commit
-
-
Konstantin Belousov authored
According to https://github.com/NuxiNL/cloudlibc: CloudABI is no longer being maintained. It was an awesome experiment, but it never got enough traction to be sustainable. There is no reason to keep it in FreeBSD. Approved by: ed (private mail) Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31923
-
- 16 Jun, 2021 1 commit
-
-
Alex Richardson authored
Attempting to parse the output as UTF-8 exposed an out-of-bounds read in vis(3) (see https://reviews.freebsd.org/D30771). However, I don't think it makes much sense to decode this output at all. Additionally, passing one byte at a time will almost certainly result in incorrect output for multi-byte characters. Reviewed By: brooks MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30772
-
- 09 Dec, 2020 1 commit
-
-
Kyle Evans authored
In both cases, print the flag bits first followed by the command. Output now looks something like this: (ktrace) _umtx_op(0x8605f7008,0xf<UMTX_OP_WAIT_UINT_PRIVATE>,0,0,0) _umtx_op(0x9fffdce8,0x80000003<UMTX_OP__32BIT|UMTX_OP_WAKE>,0x1,0,0) (truss) _umtx_op(0x7fffffffda50,UMTX_OP_WAKE,0x1,0x0,0x0) = 0 (0x0) _umtx_op(0x9fffdd08,UMTX_OP__32BIT|UMTX_OP_WAKE,0x1,0x0,0x0) = 0 (0x0) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D27325
-
- 19 Feb, 2020 2 commits
-
-
Kyle Evans authored
This is the kdump counterpart of the truss support added in r358116, and also a part of D23733. shm_open2 is the successor to shm_open. Reviewed by: kaktus
-
Kyle Evans authored
The first argument to shm_open(2) as well as shm_open2(2) may be a path or SHM_ANON. Decode SHM_ANON, at least- paths will show up as namei results in kdump output, which may be sufficient; in those cases, we'll have printed an address. Future commits will add support for shm_open2() to libsysdecode/truss/kdump. Reported by: kaktus MFC after: 3 days
-
- 25 Sep, 2019 1 commit
-
-
Kyle Evans authored
This also implements it, fixes kdump, and removes no longer needed bits from lib/libc/sys/shm_open.c for the interim.
-
- 18 Feb, 2019 1 commit
-
-
Ed Maste authored
Comment for CAPFAIL_LOOKUP refered only to paths containing ".." but it is returned for other restricted VFS lookup cases, such as absolute paths or openat(AT_FDCWD, ...).
-
- 18 Aug, 2018 1 commit
-
-
John Baldwin authored
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16611
-
- 07 Aug, 2018 1 commit
-
-
John Baldwin authored
The abidump routine output an ABI tag when -A was specified for records that were not displayed due to type or pid filtering. To fix, split the code to lookup the ABI from the code to display the ABI, move the code to display the ABI into dumpheader(), and move dumpheader() later in the main loop as a simplification. Previously dumpheader() was called under a condition that repeated conditions made later in the main loop. Reviewed by: kib MFC after: 1 month Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D16608
-
- 19 Jun, 2018 1 commit
-
-
Mariusz Zaborski authored
No functional change intended.
-
- 24 Apr, 2018 1 commit
-
-
Ed Maste authored
It is acceptable for syscallabi to map SV_ABI to SYSDECODE_ABI on all architectures; libsysdecode will return not-found sentinel values if it does not have a syscall name or errno mapping for a given architecture. Also, use __LP64__ for the SV_ILP32 -> SYSDECODE_ABI_LINUX32 mapping, for any future 32- on 64-bit linuxulator implementation. Reviewed by: jhb Sponsored by: Turing Robotic Industries Inc.
-
- 03 Jan, 2018 1 commit
-
-
Mariusz Zaborski authored
Using them we simplifies and unifies sandboxed code.
-
- 25 Nov, 2017 1 commit
-
-
John Baldwin authored
- 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(). Reviewed by: kib (earlier version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D12470
-
- 20 Nov, 2017 1 commit
-
-
Pedro F. Giffuni authored
Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
-
- 21 Sep, 2017 1 commit
-
-
Mariusz Zaborski authored
let's standardize this. Now we are always use WITH_CASPER name. Discussed with: emaste@ MFC after: 1 month
-
- 04 Sep, 2017 1 commit
-
-
John Baldwin authored
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.
-
- 10 Jun, 2017 2 commits
-
-
John Baldwin authored
-
John Baldwin authored
The PRIO_* 'which' value is stored in the first argument to setpriority(2), not the last. While here, decode the arguments to getpriority(2).
-
- 03 Jun, 2017 1 commit
-
-
John Baldwin authored
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(). PR: 215448 Submitted by: Anton Yuzhaninov <citrin+pr@citrin.ru> MFC after: 1 month
-
- 23 May, 2017 1 commit
-
-
Konstantin Belousov authored
Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024. ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important. Struct xvnode changed layout, no compat shims are provided. For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat. Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439
-
- 25 Apr, 2017 1 commit
-
-
Brooks Davis authored
Reported by: ak Reviewed by: ngie (first version) Differential Revision: https://reviews.freebsd.org/D10497
-
- 15 Mar, 2017 1 commit
-
-
John Baldwin authored
-
- 28 Feb, 2017 1 commit
-
-
Warner Losh authored
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
-
- 03 Jan, 2017 1 commit
-
-
John Baldwin authored
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.
-
- 17 Oct, 2016 1 commit
-
-
John Baldwin authored
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. Reviewed by: kib (several older versions), wblock (manpages) MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D7847
-
- 07 Oct, 2016 1 commit
-
-
Mariusz Zaborski authored
Reviewed by: cem, ed, bapt, emaste Differential Revision https://reviews.freebsd.org/D8140
-
- 01 Oct, 2016 5 commits
-
-
John Baldwin authored
-
John Baldwin authored
Previously, kdump used the kernel-only timervalsub() macro which required defining _KERNEL when including <sys/time.h>. Now, kdump uses the existing userland API. The timercmp() usage to check for a backwards timestamp is also clearer and simpler than the previous code which checked the result of the subtraction for a negative value. While here, take advantage of the 3-arg timersub() to store the subtraction results in a tempory timeval instead of overwriting the timestamp in the ktrace record and then having to restore it.
-
John Baldwin authored
The kernel uses a few negative errno values for internal conditions such as requesting a system call restart. Normally these errno values are not exposed to userland. However, kdump needs access to these values as some of then can be present in a ktrace system call return record. Previously kdump was defining _KERNEL to gain access to ehse values, but was then having to manually declare 'errno' (and doing it incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL and uses the system-provided declaration of errno.
-
John Baldwin authored
In particular, decode the off_t argument as a 64-bit argument to fix decoding for 32-bit processes.
-
John Baldwin authored
In particular, 64-bit system call arguments use up two register_t arguments for 32-bit processes. They must also be aligned on a 64-bit boundary on 32-bit powerpc processes. This fixes the decoding of lseek(), procctl(), and wait6() arguments for 32-bit processes (both native and via freebsd32). Note that the ktrace system call return record only returns a single register, so the return value of lseek is always truncated to the low 32-bits for 32-bit processes.
-
- 12 Aug, 2016 1 commit
-
-
Konstantin Belousov authored
Sponsored by: The FreeBSD Foundation MFC after: 1 week
-