HomeFreeBSD

namei: Add the abilty for the ABI to specify an alternate root path

Description

namei: Add the abilty for the ABI to specify an alternate root path

For now a non-native ABI (i.e., Linux) uses the kern_alternate_path()
facility to dynamically reroot lookups. First, an attempt is made to
lookup the file in /compat/linux/original-path. If that fails, the
lookup is done in /original-path. Thats requires a bit of code in
every ABI syscall implementation where path name translation is needed.
Also our kern_alternate_path() does not properly lookups absolute symlinks
in second attempt, i.e., does not append /compat/linux part to the resolved
link.
The change is intended to avoid this by specifiyng the ABI root directory
for namei(), using one call to pwd_altroot() during exec-time into the ABI.
In that case namei() will dynamically reroot lookups as mentioned above.

PR: 72920
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D38933
MFC after: 2 month

Details

Provenance
dchaginAuthored on May 29 2023, 8:15 AM
Reviewer
kib
Differential Revision
D38933: namei: Add the abilty for the ABI to specify an alternate root path
Parents
rG723e25f12893: avx_sig: Print statistics by interval enstead of by pressing ^T
Branches
Unknown
Tags
Unknown