Page MenuHomeFreeBSD

linux(4): Use pwd_exec() to tell namei() about ABI root path
ClosedPublic

Authored by dchagin on May 14 2023, 5:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 1:04 PM
Unknown Object (File)
Mon, Apr 29, 10:45 AM
Unknown Object (File)
Mon, Apr 22, 9:18 PM
Unknown Object (File)
Apr 6 2024, 10:31 PM
Unknown Object (File)
Mar 14 2024, 5:45 AM
Unknown Object (File)
Mar 14 2024, 5:42 AM
Unknown Object (File)
Mar 14 2024, 5:42 AM
Unknown Object (File)
Mar 14 2024, 5:33 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.May 29 2023, 8:20 AM
This revision was automatically updated to reflect the committed changes.

This commit broke font rendering in desktop Linux apps.

They use /compat/linux/etc/fonts which is a symlink to /usr/local/etc/fonts

So something with this commit is preventing the following of symlinks when Linux apps are trying to open and read files.

Running the following command results in error

/compat/linux/usr/bin/fc-list
Fontconfig error: Cannot load default config file

This commit broke font rendering in desktop Linux apps.

They use /compat/linux/etc/fonts which is a symlink to /usr/local/etc/fonts

So something with this commit is preventing the following of symlinks when Linux apps are trying to open and read files.

Running the following command results in error

/compat/linux/usr/bin/fc-list
Fontconfig error: Cannot load default config file

it would be nice to get ktrace/kdump output, some days ago Goran Mekic sent me a mail about an error related to this commit,
I reproduced the bug yesterday, here is a rather strange symptom of the problem, readlink("/proc/self/exe") succeed, however execve("/proc/self/exe") fails,
and it looks like recursive call inside namei()

I think that in case of symbolic link with leading / in target, ISRESTARTED flag should be dropped, and lookup need to start from real root, instead of compat root. This should solve that sort of problems.

This commit broke font rendering in desktop Linux apps.

They use /compat/linux/etc/fonts which is a symlink to /usr/local/etc/fonts

So something with this commit is preventing the following of symlinks when Linux apps are trying to open and read files.

Running the following command results in error

/compat/linux/usr/bin/fc-list
Fontconfig error: Cannot load default config file

https://reviews.freebsd.org/D40479