aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode
Commit message (Collapse)AuthorAgeFilesLines
* libsysdecode use MKTABLES_INCLUDEDIRSimon J. Gerraty2024-03-211-1/+6
| | | | | | | | | | | We do not conflate SYSROOT with STAGE_ROOT/DESTDIR during DIRDEPS_BUILD Make sure mktables looks in the right place. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44415
* libsysdecode: fix build after 3d0a736796a9Kyle Evans2024-03-211-1/+1
| | | | | | | TCP_USE_DDP is a kernel-only macro, so we must exclude it in libsysdecode to avoid breaking the build. Fixes: 3d0a736796a9 ("tcp: Add a new kernel-only TCP_USE_DDP [...]")
* libsysdecode: add a decoder for pollfd eventsKyle Evans2024-03-055-1/+22
| | | | | | | | We'll use this in another change to read pollfd arrays coming from a successful poll(2) operation. Reviewed by: bapt, jhb Differential Revision: https://reviews.freebsd.org/D44159
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-275-5/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-1616-32/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-165-5/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-167-14/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* vm: Allow MAP_32BIT for all architecturesDmitry Chagin2023-08-142-10/+1
| | | | | Reviewed by: alc, kib, markj Differential revision: https://reviews.freebsd.org/D41435
* libsysdecode: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPATJessica Clarke2023-07-091-1/+2
| | | | | | | | | | | | | | | | The use isn't any more generic, just the variable itself, which will allow COMPAT_32BIT to be removed. The fact we even have to check COMPAT_LIBCOMPAT here in order to pass the right flags to CPP points at our libcompat infrastructure not suitably modifying the CPP variable (which we barely use for world; this and bsd.symver.mk are the two uses, and the latter could benefit from the right flags too), but this change doesn't attempt to fix that. See commit 8fad2cda93c7 ("bsd.compat.mk: Provide new CPP and sub-make variables") for the context behind this change. Reviewed by: emaste, imp, brooks, jhb Differential Revision: https://reviews.freebsd.org/D40930
* libsysdecode: Drop dead __amd64__ && COMPAT_32BIT codeJessica Clarke2023-07-091-4/+0
| | | | | | | | Under COMPAT_32BIT we are compiling 32-bit code and so __amd64__ is not defined, __i386__ is, and we use the real i386 headers. Reviewed by: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D40916
* libsysdecode: Decode linux_clone syscall flagsDmitry Chagin2023-05-263-0/+20
| | | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40150 MFC after: 1 week
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-16/+21
|
* sysdecode: Add aarch64Warner Losh2023-04-121-2/+2
| | | | | | | | FREEBSD32 API is also supported on aarch64. Refer to aarch64 instead of arm64 because it's about the architecture (powerpc64), not the kernel interface... Sponsored by: Netflix
* linux(4): Rename linux_timer.h to linux_time.hDmitry Chagin2023-02-142-4/+4
| | | | | | | | | To avoid confusing people, rename linux_timer.h to linux_time.h, as linux_timer.c is the implementation of timer syscalls only, while linux_time.c contains implementation of all stuff declared in linux_time.h. MFC after: 2 weeks
* libsysdecode: Match socket option names containing underscoresMark Johnston2022-11-021-1/+1
| | | | | | MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc.
* Put OPIE to rest.Dag-Erling Smørgrav2022-10-021-1/+0
| | | | Differential Revision: https://reviews.freebsd.org/D36592
* libsysdecode: Grab some more ioctl definitions from CAMMark Johnston2022-06-301-0/+1
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* libsysdecode: Fix a typo in my emailDmitry Chagin2022-06-231-1/+1
| | | | | Reported by: Mikaël Urankar MFC after: 2 weeks
* libsysdecode: Decode Linux open() flagsDmitry Chagin2022-06-223-0/+37
| | | | MFC after: 2 weeks
* libsysdecode: Decode Linux *at() flagsDmitry Chagin2022-06-223-0/+10
| | | | MFC after: 2 weeks
* kdump: Decode Linux clock_nanosleep syscallDmitry Chagin2022-06-223-0/+9
| | | | MFC after: 2 weeks
* kdump: Decode Linux sigprocmask how argumentDmitry Chagin2022-06-223-0/+9
| | | | MFC after: 2 weeks
* libsysdecode: Decode setitimer, getitimer which argumentDmitry Chagin2022-06-224-1/+17
| | | | | | Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35230 MFC after: 2 weeks
* libsysdecode: Add method for decoding Linux signal namesDmitry Chagin2022-06-222-0/+80
| | | | | | Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D35215 MFC after: 2 weeks
* libsysdecode: Add preliminary support for decoding Linux syscallsDmitry Chagin2022-06-224-3/+232
| | | | | Differential revision: https://reviews.freebsd.org/D35354 MFC after: 2 weeks
* libsysdecode: For future use extract common code to a separate filesDmitry Chagin2022-06-224-159/+232
| | | | | | Reviewed by: jhb, emaste Differential revision: https://reviews.freebsd.org/D35353 MFC after: 2 weeks
* libsysdecode: Fix decoding of SCHED_ flagsDmitry Chagin2022-05-161-1/+1
| | | | | | | | Use sys/sched.h where SCHED_ flags are defined. Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D35208 MFC after: 2 weeks
* libsysdecode: Add regression tests for sysdecode_cap_rights(3)Mark Johnston2022-04-153-0/+160
| | | | | | | Reviewed by: jhb, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34900
* libsysdecode: Include required headers in sysdecode.hMark Johnston2022-04-1517-39/+4
| | | | | | | | | | Make sysdecode.h self-contained rather than forcing all consumers to include dependencies. No functional change intended. Reviewed by: pauamma_gundo.com, jhb, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34899
* libsysdecode: Fix decoding of Capsicum rightsMark Johnston2022-04-133-5/+73
| | | | | | | | | | | | | | | | | | | | | | | Capsicum rights are a bit tricky since some of them are subsets of others, and one can have rights R1 and R2 such that R1 is a subset of R2, but there is no collection of named rights whose union is R2. So, they don't behave like most other flag sets. sysdecode_cap_rights(3) does not handle this properly and so can emit misleading decodings. Try to fix all of these problems: - Include composite rights in the caprights table. - Use a constructor to sort the caprights table such that "larger" rights appear first and thus are matched first. - Don't print rights that are a subset of rights already printed, so as to minimize the length of the output. - Print a trailing message if some of the specific rights are not matched by the table. PR: 263165 Reviewed by: pauamma_gundo.com (doc), jhb, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34874
* fd: add close_range(..., CLOSE_RANGE_CLOEXEC)Mateusz Guzik2022-03-034-1/+13
| | | | | | | | For compatibility with Linux. MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D34424
* libsysdecode: Decode sendmsg/recvmsg flags containing an underscoreMark Johnston2022-01-041-1/+1
| | | | | | | Otherwise MSG_CMSG_CLOEXEC is not decoded. MFC after: 1 week Sponsored by: The FreeBSD Foundation
* sysdecode_enum.3: Fix a typo: SIGBTRAP -> SIGTRAP.John Baldwin2021-10-051-1/+1
| | | | | MFC after: 3 days Sponsored by: DARPA
* libsysdecode: Permit _ in VM_PROT_(.*) names.Nathaniel Wesley Filardo2021-09-241-1/+1
| | | | | | | | | CheriBSD defines additional protection flags which use underscores such as VM_PROT_READ_CAP and VM_PROT_WRITE_CAP. Obtained from: CheriBSD Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D30017
* sysdecode.3: Remove documentation of CloudABI ABIs.John Baldwin2021-09-231-8/+2
| | | | Fixes: cf0ee8738e31 Drop cloudabi
* libsysdecode: Decode FreeBSD32 syscalls on arm64.Olivier Houchard2021-09-221-2/+2
| | | | | | | | Add aarch64 to the list of architectures that can run 32bits FreeBSD binaries, so that truss works correctly with an arm32 binary. The same should probably be done with mips. MFC After: 1 week
* Drop cloudabiKonstantin Belousov2021-09-213-112/+0
| | | | | | | | | | | | | 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
* Remove PT_GET_SC_ARGS_ALLKonstantin Belousov2021-09-161-1/+1
| | | | | | | | | | | | | | Reimplement bdf0f24bb16d556a5b by checking for the caller' ABI in the implementation of PT_GET_SC_ARGS, and copying out everything if it is Linuxolator. Also fix a minor information leak: if PT_GET_SC_ARGS_ALL is done on the thread reused after other process, it allows to read some number of that thread last syscall arguments. Clear td_sa.args in thread_alloc(). Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D31968
* linux: implement PTRACE_GET_SYSCALL_INFOEdward Tomasz Napierala2021-09-141-1/+1
| | | | | | | | | This is one of the pieces required to make modern (ie Focal) strace(1) work. Reviewed By: jhb (earlier version) Sponsored by: EPSRC Differential Revision: https://reviews.freebsd.org/D28212
* libsysdecode: fix decoding of TCP_NOPUSH and TCP_MD5SIGMichael Tuexen2021-02-091-1/+1
| | | | | | | | | | TCP_FASTOPEN_MIN_COOKIE_LEN was incorrectly registered as a name of a IPPROTO_TCP level socket option, which overwrote TCP_NOPUSH. TCP_FASTOPEN_PSK_LEN was incorrectly registered as a name of an IPPROTO_TCP level socket option, which overwrote TCP_MD5SIG. MFC after: 3 days Sponsored by: Netflix, Inc.
* libsysdecode: decode _UMTX_OP flagsKyle Evans2020-12-093-1/+17
| | | | | | | | | | | | Assume that UMTX_OP with a double underbar following is a flag, while any underbar+alphanumeric combination immeiately following is an op. This was a part of D27325. Reviewed by: kib Notes: svn path=/head/; revision=368480
* libsysdecode: account for invalid protection flagsPawel Biernacki2020-11-261-1/+1
| | | | | | | | Reported by: jhb MFC with: r368022 Notes: svn path=/head/; revision=368053
* libsysdecode: correctly decode mmap flagsPawel Biernacki2020-11-251-1/+1
| | | | | | | | | | | | | | r352913 added decoding of mmap PROT_MAX()'d flags but didn’t account for the case where different values were specified for PROT_MAX and regular flags. Fix it. Submitted by: sigsys_gmail.com Reported by: sigsys_gmail.com MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D27312 Notes: svn path=/head/; revision=368022
* Make linux_errtbl[] static.Edward Tomasz Napierala2020-11-031-1/+0
| | | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27004 Notes: svn path=/head/; revision=367301
* Add defines for Linux errno values and use them to make linux_errtbl[]Edward Tomasz Napierala2020-10-291-0/+1
| | | | | | | | | | | | | more readable. While here, add linux_check_errtbl() function to make sure we don't leave holes. No objections: emaste (earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26972 Notes: svn path=/head/; revision=367132
* Fix a few mandoc issuesGordon Bergling2020-10-091-3/+3
| | | | | | | | | | - skipping paragraph macro: Pp after Sh - sections out of conventional order: Sh EXAMPLES - whitespace at end of input line - normalizing date format Notes: svn path=/head/; revision=366583
* Fix compilation of libsysdecode after r365522, should have been part of it.Konstantin Belousov2020-09-091-0/+1
| | | | | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365523
* Add MSG_TLSAPPDATA to lib/libsysdecode/mktables.Rick Macklem2020-08-201-1/+1
| | | | | | | | | I have no idea what this does (and until now that it even existed), but apparently it needs this entry changed for the MSG_TLSAPPDATA, since it is kernel only. Notes: svn path=/head/; revision=364415