]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Export argc, argv, envc, envv, and ps_strings in auxargs.
authorbrooks <brooks@FreeBSD.org>
Wed, 15 Apr 2020 20:23:55 +0000 (20:23 +0000)
committerbrooks <brooks@FreeBSD.org>
Wed, 15 Apr 2020 20:23:55 +0000 (20:23 +0000)
commit3bc86c9ae7f722f71566933fdf158eead7a68790
tree5b9466f71b6ce508704a4d8284aee31c8f7d69e3
parent27c07b76c4be70d3244359ffc5ae93122c419757
Export argc, argv, envc, envv, and ps_strings in auxargs.

This simplifies discovery of these values, potentially with reducing the
number of syscalls we need to make at runtime.  Longer term, we wish to
convert the startup process to pass an auxargs pointer to _start() and
use that rather than walking off the end of envv.  This is cleaner,
more C-friendly, and for systems with strong bounds (e.g. CHERI)
necessary.

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24407
sys/compat/freebsd32/freebsd32_misc.c
sys/kern/imgact_elf.c
sys/kern/kern_exec.c
sys/sys/elf_common.h
sys/sys/imgact.h