History log of /freebsd-14.2/lib/libsysdecode/flags.c (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0
# efb74e16 05-Mar-2024 Kyle Evans <[email protected]>

libsysdecode: add a decoder for pollfd events

We'll use this in another change to read pollfd arrays coming from a
successful poll(2) operation.

Reviewed by: bapt, jhb

(cherry picked from commit b

libsysdecode: add a decoder for pollfd events

We'll use this in another change to read pollfd arrays coming from a
successful poll(2) operation.

Reviewed by: bapt, jhb

(cherry picked from commit bd23e71f91ceec5dfdffc28bbd0020849fdd20b4)

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <[email protected]>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f3e11927 14-Aug-2023 Dmitry Chagin <[email protected]>

vm: Allow MAP_32BIT for all architectures

Reviewed by: alc, kib, markj
Differential revision: https://reviews.freebsd.org/D41435


Revision tags: release/13.2.0, release/12.4.0
# 2fc3a51d 22-Jun-2022 Dmitry Chagin <[email protected]>

libsysdecode: Decode setitimer, getitimer which argument

Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D35230
MFC after: 2 weeks


# 9dac6096 22-Jun-2022 Dmitry Chagin <[email protected]>

libsysdecode: For future use extract common code to a separate files

Reviewed by: jhb, emaste
Differential revision: https://reviews.freebsd.org/D35353
MFC after: 2 weeks


Revision tags: release/13.1.0
# 869199d9 13-Apr-2022 Mark Johnston <[email protected]>

libsysdecode: Fix decoding of Capsicum rights

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 i

libsysdecode: Fix decoding of Capsicum rights

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

show more ...


# f3f3e3c4 03-Mar-2022 Mateusz Guzik <[email protected]>

fd: add close_range(..., CLOSE_RANGE_CLOEXEC)

For compatibility with Linux.

MFC after: 3 days
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D34424


Revision tags: release/12.3.0, release/13.0.0
# 3b27074b 09-Dec-2020 Kyle Evans <[email protected]>

libsysdecode: decode _UMTX_OP flags

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 D27

libsysdecode: decode _UMTX_OP flags

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

show more ...


# 569da02b 26-Nov-2020 Pawel Biernacki <[email protected]>

libsysdecode: account for invalid protection flags

Reported by: jhb
MFC with: r368022


# 4cbec443 25-Nov-2020 Pawel Biernacki <[email protected]>

libsysdecode: correctly decode mmap flags

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

libsysdecode: correctly decode mmap flags

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

show more ...


Revision tags: release/12.2.0, release/11.4.0
# c70019dd 19-Feb-2020 Kyle Evans <[email protected]>

libsysdecode: grab shmflags from sys/mman.h, add decode method

Any SHM_* flag here is (and likely will continue to be) a shmflag that may
be passed to shm_open2(), with exception to SHM_ANON. This i

libsysdecode: grab shmflags from sys/mman.h, add decode method

Any SHM_* flag here is (and likely will continue to be) a shmflag that may
be passed to shm_open2(), with exception to SHM_ANON. This is a prereq to
adding appropriate support to truss/kdump.

Reviewed by: kaktus (slightly earlier version)
Differential Revision: https://reviews.freebsd.org/D23733

show more ...


Revision tags: release/12.1.0
# c1dd36cf 30-Sep-2019 Pawel Biernacki <[email protected]>

libsysdecode: decode PROT_MAX flags

Extend libsysdecode to pretty-print PROT_MAX flags and fix decoding of regular protection flags broken since r349240.

before:
truss:
mmap(0x0,40960,0x30000,MAP_P

libsysdecode: decode PROT_MAX flags

Extend libsysdecode to pretty-print PROT_MAX flags and fix decoding of regular protection flags broken since r349240.

before:
truss:
mmap(0x0,40960,0x30000,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366234624 (0x800632000)
kdump:
11439 protmax CALL mmap(0,0xa000,0x30000<><invalid>196608,0x21002<MAP_PRIVATE|MAP_ANON|MAP_NOCORE>,0xffffffff,0)

after:
truss:
mmap(0x0,40960,PROT_MAX(PROT_READ|PROT_WRITE)|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366234624 (0x800632000)
kdump:
11439 protmax CALL mmap(0,0xa000,0x30000<PROT_MAX(PROT_READ|PROT_WRITE)|PROT_READ|PROT_WRITE>,0x21002<MAP_PRIVATE|MAP_ANON|MAP_NOCORE>,0xffffffff,0)

Reviewed by: kib (mentor)
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D21706

show more ...


Revision tags: release/11.3.0
# bac4817b 04-Feb-2019 Michael Tuexen <[email protected]>

Add missing SCTP_EOR entry.

MFC after: 3 days


Revision tags: release/12.0.0, release/11.2.0
# 0faae8b9 15-Jan-2018 Michael Tuexen <[email protected]>

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


# a826eb5a 15-Jan-2018 Michael Tuexen <[email protected]>

Add support for decoding the type of a cmsg.


# 1e6455d8 14-Jan-2018 Michael Tuexen <[email protected]>

Add a function is decode the sinfo_flags of struct sctp_sndrcvinfo.


# a62bf68d 14-Jan-2018 Michael Tuexen <[email protected]>

Add suppor for the supported PR-SCTP policies.


# ffb66079 25-Nov-2017 John Baldwin <[email protected]>

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

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().

Reviewed by: kib (earlier version)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D12470

show more ...


# 2b6e6d85 07-Nov-2017 John Baldwin <[email protected]>

Wrap to 80 columns. No functional change.


# dae8f61f 25-Oct-2017 Warner Losh <[email protected]>

RB_POWERCYCLE needs to be handled like RB_POWEROFF for decoding.

Sponsored by: Netflix


Revision tags: release/10.4.0
# c9c69eba 17-Sep-2017 Ed Maste <[email protected]>

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.

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
Reviewed by: cem
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12391

show more ...


# 39a3a438 04-Sep-2017 John Baldwin <[email protected]>

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 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.

show more ...


Revision tags: release/11.1.0
# 30b94d0c 10-Jun-2017 John Baldwin <[email protected]>

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

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.

show more ...


# ee8aa41d 03-Jun-2017 John Baldwin <[email protected]>

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

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().

PR: 215448
Submitted by: Anton Yuzhaninov <[email protected]>
MFC after: 1 month

show more ...


# 738a93a4 25-May-2017 Michael Tuexen <[email protected]>

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

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.

show more ...


12