HomeFreeBSD

Attempt to use AT_PS_STRINGS to get the ps_strings pointer.

Description

Attempt to use AT_PS_STRINGS to get the ps_strings pointer.

This saves a system call and avoids one of the (relatively rare) cases
of the kernel exporting pointers via sysctl.

As a temporary measure, keep the sysctl support to allow limited
compatability with old kernels.

Fail gracefully if ps_strings can't be found (should never happen).

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24407

Details

Provenance
brooksAuthored on
Reviewer
kib
Differential Revision
D24407: Export argc, argv, envc, envv, and ps_strings in auxargs.
Parents
rS359990: Support AT_PS_STRINGS in _elf_aux_info().
Branches
Unknown
Tags
Unknown