Commit Graph

28 Commits

Author SHA1 Message Date
Ryan Houdek
1979273ce5 FHU/FS: Create WIN32 helpers for some functions.
These use std::filesystem and should be moved over to WIN32 specific
code.

Added comments to explain that these are currently placeholders and
since we don't do mingw+glibc fault testing these won't get picked up
anyway.
2023-04-16 00:36:20 -07:00
Ryan Houdek
e98a46aa5f Review comments 2023-04-07 17:01:53 -07:00
Ryan Houdek
dce6389d87 FHU: Convert relative/absolute check to string_view 2023-04-07 17:01:52 -07:00
Ryan Houdek
8fb7e8d80e FHU: Add RenameFile helper 2023-04-07 17:01:51 -07:00
Ryan Houdek
546a1edb55 CodeReview 2023-04-01 09:27:01 -07:00
Ryan Houdek
97daec3dba Review comments 2023-03-31 06:03:06 -07:00
Ryan Houdek
53bbbd5a4f Review code 2023-03-30 16:28:34 -07:00
Ryan Houdek
4cc14cf0e9 FHU: Add more utilities 2023-03-30 16:28:33 -07:00
Ryan Houdek
1eb36b8b31 Convert a ton of things over to fextl 2023-03-30 16:28:33 -07:00
Ryan Houdek
1248f3573c CPUInfo: Switch away from using get_nprocs_conf
Allocates memory behind our backs. Needed to make CI glibc allocator
clean.
2023-03-13 10:50:25 -07:00
Ryan Houdek
dcce9add60
Merge pull request #2334 from Sonicadvance1/fix_execveat
FEXLoader: Adds support for execveat with AT_EMPTY_PATH
2023-01-23 02:32:15 -08:00
Ryan Houdek
79b8442dbc FHU: Add helpers for symlink checking 2023-01-22 14:23:55 -08:00
Steven Vanden Branden
fd5bfd9e40 fix ifdef to use HAS_SYSCALL_TGKILL for tgkill as it was intented 2023-01-19 22:29:12 +01:00
Ryan Houdek
27309114be FHU: Convert to a interface target
Noticed recently that `FEXServer -w` was broken and couldn't understand
why. Turns out that FHU syscall handling was /always/ falling down the
`#else` path in the handlers since cmake `add_definitions` follows
folder scoping rules.

This means it was always returning -1, which was causing FEXServer's
pidfd_open usage to always receive -1, which meant the sendmsg with FD
was always failing, which meant the `FEXServer -w` would forever wait
for a message that was never sent.

Converting the utility over to a target not only fixes definition
scoping problems, but also makes the other paths actually work.

This found some compiling bugs and instead lets us define SYS_pidfd_open
if it doesn't exist. Letting the kernel return the ENOSYS if it doesn't
exist on that platform.

Main thing, fixes FEXServer -w hanging forever.
2022-09-14 14:58:23 -07:00
wannacu
0dd03e9cb6 Add pidfd_open syscall helpers 2022-07-15 13:44:07 +08:00
Stefanos Kornilios Mitsis Poiitidis
73d43c1d55
Merge pull request #1700 from FEX-Emu/skmp/standarized-todo
Standarized TODO markers: FEX_TODO, FEX_TODO_ISSUE
2022-05-16 14:17:16 +03:00
Stefanos Kornilios Misis Poiitidis
256df76674 FEX_TODO: Convert some XXX to FEX_TODO 2022-05-16 12:22:42 +03:00
Stefanos Kornilios Misis Poiitidis
ad1fd7f54b FexHeaderUtils: Add TodoDefines 2022-05-11 11:08:28 +03:00
Tony Wasserka
9aaace51e1 ScopedSignalMask: Add usage guidelines 2022-05-10 17:18:36 +02:00
Tony Wasserka
fb0bb8dd2c ScopedSignalMask: Unify implementation 2022-05-02 11:27:26 +02:00
Stefanos Kornilios Misis Poiitidis
a365a70275 Review feedback 2022-05-02 01:51:17 +03:00
Stefanos Kornilios Misis Poiitidis
3cb8ae9a9c ScopedSignalMask: Add shared mutex support, move constructors 2022-04-30 16:00:00 +03:00
Ryan Houdek
4cb6918506 Change page define usages over to self-defined
In the case of an AArch64 builder is using 16kb or 64kb pages like is
common on servers then it would fail to compile, even if the resulting
application would only ever run on 4k page hosts.

Resolve this by removing the build check and hardcoding 4kb pages for
each of our uses. We still require 4kb pages to run, so this mostly just
removes the weirdness where it is 16kb builder + 4k runner. Would have
broken some of our assumptions when running.
2022-03-06 07:33:10 -08:00
Ryan Houdek
a0efd2b01f Resolve comments. 2022-02-28 21:04:03 -08:00
The Great Wizard Azkali
d60710d3f1
Define proper statx syscall depending on CPU architecture 2022-02-24 10:20:28 +01:00
Azkali
75988b2ae5 Improve compatibility with older uapi kernel headers
Following up the work previously done in 2079f6b3c7.
Adding more defines for older Linux uapi headers missing some defines.
2022-02-24 09:49:56 +01:00
Ryan Houdek
70aaa1117a FEXHeaderUtils: Adds ScopedSignalMaskWithMutex
This class allows a scoped region lock a mutex and mask signals.

This is necessary for thread and signal safety coming up
2022-01-30 18:15:57 -08:00
Ryan Houdek
2079f6b3c7 Improves compile ability for older libraries
Adds a header only include utility folder that can be included from
everywhere.

Contains syscall helpers for older glibc and defines for older Linux
uapi headers missing some defines.
2021-12-24 15:43:25 -08:00