Commit Graph

11104 Commits

Author SHA1 Message Date
Ryan Houdek
60c52e3826
Merge pull request #4167 from pmatos/CheckLDPathNonEmpty
Some checks are pending
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
Check that LDPath is not empty
2024-11-22 15:47:42 -08:00
Paulo Matos
13b806130b Check that LDPath is not empty
This ensures we don't underflow at --RootFSLength.
2024-11-22 10:24:14 +01:00
Ryan Houdek
22058c06a1
Merge pull request #4164 from bylaws/swwow
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
WOW64: Set the software CPU area flag
2024-11-19 09:39:33 -08:00
Ryan Houdek
d5c96555f1
Merge pull request #4159 from asahilina/fexserver-two-sockets
FEXServer: Listen on both abstract & named sockets
2024-11-19 09:28:48 -08:00
Asahi Lina
c3e8cd8d30 docs: Document that std::filesystem::temp_directory_path() is unsafe 2024-11-20 02:05:32 +09:00
Asahi Lina
d761fc44f4 FEXServer: Listen on both abstract & named sockets
Abstract sockets have one limitation: they are bound to a network
namespace. Chromium/CEF sandboxes using a new netns, which breaks
connecting to the FEXServer.

To work around this, use and try *both* abstract and named sockets. As
long as either the filesystem or the network is unsandboxed, things will
work. If both are sandboxed, there isn't much we can do... but at that
point we shouldn't be reinitializing the FEXServer connection anyway
since the FS should be available on FEXInterpreter startup.
2024-11-20 01:58:17 +09:00
Asahi Lina
a1aa2547ce FEXServerClient: Do not use strerror() in ConnectToServer()
This triggers glibc allocation.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2024-11-20 01:58:17 +09:00
Asahi Lina
44213c3968 FEXServerClient: Switch GetTempFolder to not use temp_directory_path()
Apparently this causes allocations which are banned in some paths?
2024-11-19 01:46:33 +09:00
Billy Laws
830bd347c5 WOW64: Set the software CPU area flag
This is required for wow64.dll to setup the cross-process queue
that is used to pass through e.g. memory unmap events.
2024-11-18 16:18:31 +00:00
Ryan Houdek
bcfdf39d63
Merge pull request #4157 from asahilina/fix-chromium-sandbox
Some checks are pending
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
Support CLONE_FS and CLONE_FILES with fork() semantics
2024-11-18 06:42:15 -08:00
Asahi Lina
bfed21870f Support CLONE_FS and CLONE_FILES with fork() semantics
Needed by Discord, part of the Chromium sandbox code. The warning still
triggers because Chromium asks for CLONE_VM on x86_64, but that can be
safely ignored (CLONE_FS is the one that matters).
2024-11-18 22:09:33 +09:00
Ryan Houdek
4278c48791
Merge pull request #4158 from asahilina/hide-rootfs-fd-take2
Some checks are pending
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
FileManagement: Hide the FEX RootFS fd from /proc/self/fd take 2
2024-11-17 20:27:59 -08:00
Ryan Houdek
c1db7a78b1
Merge pull request #4153 from pmatos/VixlSkip
Add some more tests as unsupported by vixl
2024-11-17 19:56:56 -08:00
Ryan Houdek
1bf06f8946
Merge pull request #4162 from pmatos/WarningAvoid
Avoid warning on assertionless builds
2024-11-17 19:03:31 -08:00
Ryan Houdek
09bfe58827
Merge pull request #4160 from asahilina/align-stack
FEXLoader: Align stack base
2024-11-17 18:27:25 -08:00
Paulo Matos
474c780399 Avoid warning on assertionless builds
This was causing unused variable warning due
to the variable only being used in an assertion.
2024-11-13 15:17:36 +01:00
Asahi Lina
4a67893f1d FEXLoader: Align stack base
This ensures that __libc_stack_end is aligned, the same way it is on
native.
2024-11-13 03:47:43 +09:00
Asahi Lina
73ffaa1e18 FileManagement: Hide the FEX RootFS fd from /proc/self/fd take 2
Apparently Chromium/CEF can chroot or otherwise sandbox the filesystem
away before forking and checking for directory FDs, making /proc
inaccessible, which means we can't stat it for our inode check, breaking
the hiding.

So, double down on things and do what Chromium does: open an fd to /proc
ahead of time, so that continues to work. Then we use it to update the
inode of our RootFS fd instead, and finally, also do the /proc fd itself
to hide that one too.

We also don't need to check the st_dev of /proc more than once, since
that's not expected to change anyway.

Fixes cefsimple.
2024-11-13 01:26:42 +09:00
Ryan Houdek
e675f4241a
Merge pull request #4154 from Liamolucko/check-home
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
Check if a candidate home directory exists before using it
2024-11-05 20:07:30 -08:00
Liam Murphy
7a61d9d2b4
Check if a candidate home directory exists before using it
This allows FEX to be used in situations where `HOME` is set to
something invalid, e.g. inside Nix builds.
2024-11-06 11:16:53 +11:00
Paulo Matos
06b950a9cd Rounding test doesn't need to be skipped 2024-11-04 19:02:12 +01:00
Paulo Matos
de70651406 Add some more tests as unsupported by vixl
It seems a form of `mrs` is unsupported as well as the hint `wfe` used for `pause`.
Remove skipping Rounding(Neg|Pos).asm as they are passing.
2024-11-04 18:52:48 +01:00
LC
5ad7fdb2f3
Merge pull request #4149 from Sonicadvance1/iropsize_convert_class
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
IR: Convert OpSize over to enum class
2024-10-30 23:55:55 -04:00
Ryan Houdek
9b6cc8f7e0
IR: Convert OpSize over to enum class
NFC

Do the final mopping up to convert the OpSize enum to an enum class!
2024-10-29 16:52:16 -07:00
LC
5c6de4ed14
Merge pull request #4147 from Sonicadvance1/iropsize_convert_irops
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
IR: Converts base IR operations to store OpSize sizes
2024-10-29 12:02:11 -04:00
Ryan Houdek
82f936cb6d
IR: Converts base IR operations to store OpSize sizes
NFC

Finally converts the IR operations themselves to store the OpSize for
the IR operation size and element sizes.

This also finally, FINALLY, converts that remaining `_Constant` helper
to stop using a size field that is specified in bits rather than bytes
like all the other IR op handlers. That thing was so confusing and now
it's gone.
2024-10-28 21:26:59 -07:00
LC
493b952e3f
Merge pull request #4146 from Sonicadvance1/iropsize_implicit_jit
Some checks are pending
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
JIT: Remove implicit OpSize conversions
2024-10-28 23:47:36 -04:00
Ryan Houdek
460a21625e
JIT: Remove implicit OpSize conversions
NFC
2024-10-28 19:48:40 -07:00
LC
00ab3f8440
Merge pull request #4145 from Sonicadvance1/iropsize_various_implicit
OpcodeDispatcher: Various missed OpSize implicit cast fixes
2024-10-28 22:38:41 -04:00
Ryan Houdek
034b62292b
Passes/x86StackOptimization: Fixes implicit conversion of OpSize 2024-10-28 19:26:02 -07:00
Ryan Houdek
7b615a07d0
OpcodeDispatcher: Various missed OpSize implicit cast fixes
NFC
Probably more of these around, just tracking the few I found.
2024-10-28 19:18:36 -07:00
LC
704841f004
Merge pull request #4144 from Sonicadvance1/iropsize_addrsize
OpcodeDispatcher: Convert address size helpers to use OpSize
2024-10-28 22:12:40 -04:00
LC
c122f3faf9
Merge pull request #4143 from Sonicadvance1/iropsize_flags
OpcodeDispatcher: Convert flags helpers over to OpSize
2024-10-28 22:10:19 -04:00
Ryan Houdek
f74f276d64
OpcodeDispatcher: Convert address size helpers to use OpSize
NFC
2024-10-28 19:02:34 -07:00
Ryan Houdek
4b10cbdafd
OpcodeDispatcher: Convert flags helpers over to OpSize
NFC

Plus the tertiary bits that require changing to support it.
2024-10-28 18:56:42 -07:00
LC
04c701e912
Merge pull request #4142 from Sonicadvance1/irsize_loadstoregpr
OpcodeDispatcher: Convert {Load,Store}GPRRegister to OpSize
2024-10-28 21:04:01 -04:00
LC
0c29f8faad
Merge pull request #4141 from Sonicadvance1/missing_ir_sizes
IR: Fix some missing OpSize conversions
2024-10-28 21:02:46 -04:00
Ryan Houdek
5ed82fa0f6
OpcodeDispatcher: Convert {Load,Store}GPRRegister to OpSize
Trivial but quite a few places pass in a raw integer

NFC
2024-10-28 16:35:23 -07:00
Ryan Houdek
6cca007817
IR: Fix some missing OpSize conversions
Missed these in the previous PR.
2024-10-28 16:25:36 -07:00
LC
c0a9463700
Merge pull request #4140 from Sonicadvance1/enforce_irsize
Some checks are pending
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Waiting to run
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Waiting to run
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Waiting to run
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Waiting to run
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Waiting to run
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Waiting to run
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Waiting to run
Convert all of the IR operations to use OpSize
2024-10-28 18:20:02 -04:00
Ryan Houdek
55b3d67eb4
Merge pull request #4138 from asahilina/hide-rootfs-fd
FileManagement: Hide the FEX RootFS fd from /proc/self/fd
2024-10-28 14:24:55 -07:00
Ryan Houdek
65ddae1b71
IR: Change F80VBSLStack to use IR::OpSize 2024-10-28 02:25:17 -07:00
Ryan Houdek
063f524084
IR: Change F80CVTToInt to use IR::OpSize 2024-10-28 02:24:25 -07:00
Ryan Houdek
2dd0a82059
IR: Change F80CVTTo to use IR::OpSize 2024-10-28 02:23:47 -07:00
Ryan Houdek
b810070e9f
IR: Change F80CVTInt to use IR::OpSize 2024-10-28 02:07:20 -07:00
Ryan Houdek
4c7ac17f7d
IR: Change F80CVT to use IR::OpSize 2024-10-28 02:06:48 -07:00
Ryan Houdek
84767c8b20
IR: Change PushStack to use IR::OpSize 2024-10-28 02:05:35 -07:00
Ryan Houdek
eccfb53bd5
IR: Change StoreStackMemory to use IR::OpSize 2024-10-28 02:01:47 -07:00
Ryan Houdek
f4e930262f
IR: Change PCLMUL to use IR::OpSize 2024-10-28 01:50:24 -07:00
Ryan Houdek
d26d9e7e03
IR: Change CRC32 to use IR::OpSize 2024-10-28 01:50:24 -07:00