Commit Graph
20 Commits
Author SHA1 Message Date
Ryan Houdek 6b3a5470c4 Linux: Fixes tracking of /proc/self with dirfd
Previously we would miss this. Causing things like lscpu to leak state.
2021-08-30 02:20:39 -07:00
Ryan Houdek f161e3bfb0 Massive amount of IWYU cleanup
This isn't quite a 100% clean sweep of IWYU.
There are some false positives where clang fails.
Additionally there are still a few missed in the frontend side of things
that I didn't get to
2021-08-28 00:32:15 -07:00
Ryan Houdek 6d60689ad4 FileManagement: Stop calling getpid for every file access
We can cache the pid result, we know every case in which the pid is
changed.
This makes watching strace significantly less annoying.
2021-08-20 23:47:48 -07:00
Ryan Houdek 1c1f40e5af Linux: Fixes readlinkat for self
Similar code to readlinkat. Needs to be correct for self otherwise we
return EINVAL which is unexpected since self should always be a symlink

Fixes a bug in running bwrap
2021-08-06 22:51:31 -07:00
Lioncash c971d3e56b FileManager: Construct fstream in place
While we're at it, we can make use of .data() to avoid a bounds check
that we know will never fail.
2021-06-10 21:56:08 -04:00
Lioncash 10ec1d5d15 FileManager: Make use of insert_or_assign
Avoids some default constructions that get assigned over immediately.
2021-06-10 21:38:39 -04:00
Ryan Houdek 8b3bbd0ea1 Implements openat2 2021-05-27 22:59:37 -07:00
Ryan Houdek cc477b6964 Implements close_range syscall 2021-05-27 22:59:34 -07:00
Ryan Houdek 298481f9af Support redirecting thread-self exe softlink 2021-05-11 18:15:14 -07:00
Ryan Houdek 19e45544fb Handles symlinks in rootfs in openat
This fixes an issue where rootfs has symlinks to other things in the rootfs so we need to track it through.

Relies on #1009 to be merged first.
Fixes any application that relies on libblas, mpv for example.
2021-05-04 22:13:52 -07:00
Ryan Houdek ac97c05271 Handle more cases of an application pinging self
AppImage uses this to inspect its own executable to ensure it is an AppImage file.
2021-05-04 18:09:15 -07:00
Stefanos Kornilios Mitsis Poiitidis 13bfdcad06 Emulated Files: Don't precalculate /proc/pid path, it changes after fork 2021-04-15 15:33:10 +03:00
Stefanos Kornilios Mitsis Poiitidis 942b8549c6 Docs: Add tags to the source code 2021-03-30 12:21:18 +03:00
Stefanos Kornilios Mitsis Poiitidis 0106b362d6 EmulatedFiles: Lock around FDToNameMap accesses 2021-03-18 12:45:27 +02:00
Stefanos Kornilios Mitsis Poiitidis f0d3004363 Thunks: Add Thunk json, thunk guest folder 2021-03-10 15:51:34 +02:00
Ryan Houdek d78a3784fb Guards SYS_faccessat2 define for new enough glibc defines 2021-02-25 13:44:40 -08:00
Ryan Houdek ac92a103df Adds support for faccessat2 to FileManager 2021-02-24 09:51:29 -08:00
Stefanos Kornilios Mitsis Poiitidis f9aa457e3f Syscalls: chmodat, faccessat glibc interface differs from kernel 2021-02-02 14:35:27 +02:00
Ryan Houdek 66e98365eb Captures fsstatat in filesystem overlay
Fixes Vulkan loader searching for vulkan json ICD files
2021-01-10 02:13:48 -08:00
Ryan Houdek 37983006f0 Moves FEXCore's SignalDelegator and SyscallHandler to the frontend
Sadly these things can't be split without breaking functionality so it
turns in to a bit of a mess.

SyscallHandler is very much something that is a Linux only construct and
shouldn't be in FEXCore itself. Lets the frontend register a
Syscallhandler with FEXCore. FEXCore itself is then aware of the current
syscall ABI and handles the ABI in an optimal fashion.
So it is not a 100% clean break otherwise we would lose performance.

The SignalDelegator then needs to move to the frontend since the
SyscallHandler requires it for signal based syscalls.
The CPU backend signal handling still needs to happen in FEXCore because
it is a very tight coupling with the CPU backend.
Once we need to support more Signal handling we can give the backends
cleaner support to select which specific OS handler to handle.
2020-12-13 22:38:04 -08:00