HomeFreeBSD

Fix AT_EXECPATH for direct exec mode.

Description

Fix AT_EXECPATH for direct exec mode.

When activated in direct exec mode, kernel-provided AT_EXECPATH points
to the interpreter. We need to recalculate auxv to point to the
string with the path to the executable which is actually executed.

The somewhat problematic case is when the executable path is relative
and either $PATH use is not enabled or it contains '/' so $PATH search
is not performed. In this case resulting AT_EXECPATH is relative, I
might fix this later.

Reported and reviewed by: rstone
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D22894

Details

Provenance
kibAuthored on Jan 2 2020, 10:48 PM
Parents
rGb837dadd87b8: bhyve: terminate waiting loops if thread suspension is requested.
Branches
Unknown
Tags
Unknown

Event Timeline