Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procstat auxv improvements #1890

Merged
merged 7 commits into from
Oct 16, 2023
Merged

procstat auxv improvements #1890

merged 7 commits into from
Oct 16, 2023

Commits on Oct 16, 2023

  1. libprocstat: simplify auxv value conversion

    Avoid a weird dance through the union and treat all 32-bit values as
    unsigned integers.  This avoids sign extension of flags and userspace
    pointers.
    
    Reviewed by:	markj
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D42198
    
    (cherry picked from commit 9735cc0)
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    9aaa30b View commit details
    Browse the repository at this point in the history
  2. libprocstat: make sv_name not static

    Making this variable static makes is_elf32_sysctl() and callers thread
    unsafe.
    
    Use a less absurd length for sv_name.  The longest name in the system is
    "FreeBSD ELF64 V2" which tips the scales at 16+1 bytes.  We'll almost
    certainly have other problems if we exceed 32 characters.
    
    Reviewed by:	markj
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D42199
    
    (cherry picked from commit 72a4ee2)
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    fbc0d6c View commit details
    Browse the repository at this point in the history
  3. libprocstat: copy all the 32-bit auxv entries

    Use source struct size not the destination struct size so we copy all
    the auxv entries, not just the first half of them.
    
    Fix a style issue on an adjacent line.
    
    Reviewed by:	markj
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D42200
    
    (cherry picked from commit 8f06fab)
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    ea3c529 View commit details
    Browse the repository at this point in the history
  4. libprocstat: improve conditional for 32-bit compat

    Include support for translating 32-bit auxv vectors on non-64-bit
    platforms that aren't riscv (which has no 32-bit ABI support and
    probably never will).
    
    Reviewed by:	markj
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D42201
    
    (cherry picked from commit 248fe3d)
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    890d708 View commit details
    Browse the repository at this point in the history
  5. procstat auxv: widen COMM column to MAXCOMLEN

    For reasons unknown, procstat subcommands typically display the command
    in a 16+overflow column format.  However, the command may be up to
    MAXCOMLEN (19) characters long causing the column to spill into the next
    one. Since there's plenty of room in the auxv case, bump the column
    width up to 19 to avoid this issue.  While this is a format change 1)
    users who want to parse the data should use libxo output and 2) this
    makes it possible to parse reliably with cut.
    
    Reviewed by:	markj
    Sponsored by:	DARPA
    Differential Revision:	https://reviews.freebsd.org/D42202
    
    (cherry picked from commit 8f9f7b4)
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    3960eb4 View commit details
    Browse the repository at this point in the history
  6. libprocstat: translate auxv for hybrid processes

    As with 32-bit compat, support hybrid auxv vectors in CheriABI procstat.
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    37e4fdc View commit details
    Browse the repository at this point in the history
  7. procstat auxv: show capabilities

    For ELF auxargs that are pointers, print more capability information
    in verbose mode.
    brooksdavis committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    4b88f1a View commit details
    Browse the repository at this point in the history