Strange that we don't have a PR about thisFor now a non-native ABI (i.e., as everyone who debootstrap UbuntuLinux) uses the kern_alternate_path()
faces this problem,facility to dynamically reroot lookups. as Ubuntu 22.04 contains many symlinksFirst, including rtld,an attempt is made to
which point to the absolute path.lookup the file in /compat/linux/original-path. If that fails, People are forced to fix such symlinks by handthe
or use something like https://github.com/brandt/symlinkslookup 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_exec() during exec-time into the ABI.
In that case namei() will dynamically reroot lookups as mentioned above.
It would be nice to merge it into releng/13.2.PR: 72920
MFC after: 1 month