Commit graph

141 commits

Author SHA1 Message Date
RipleyTom 159370446f RPCN v1.4 2025-02-12 15:00:50 +01:00
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
Elad 2614450e4b Fix IDM image serialization 2025-01-04 09:29:09 +02:00
Elad 575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
RipleyTom 0e8f1a9bf9 sys_net: Remove lingering ppu_to_awake from queue on timeout 2024-11-22 18:44:01 +02:00
Megamouse 352229efbd Fix some warnings 2024-06-30 12:02:37 +02:00
RipleyTom feff2ba09e Fix race in sys_net select and poll 2024-06-14 10:52:34 +03:00
RipleyTom b7a882f42b Split normal sockets and p2p sockets handling v2 2024-05-08 20:04:23 +03:00
Megamouse 7f3ad4fc2c lv2_socket: reset queue after move 2024-04-05 19:41:41 +02:00
RipleyTom ac8e914a25
improves sig_ctx handling, sys_net logging and fixes udpp2p protocol (#15235) 2024-02-24 12:40:53 +01:00
RipleyTom 9b387485b5 Avoid modifying any memory on SYS_NET_EINTR cases 2024-02-09 18:07:18 +02:00
RipleyTom 26d406fec3 RPCN 1.1 2024-02-05 09:44:29 +01:00
Megamouse e26d4e1762 sys_net: fix some warnings
move some data to heap
2023-10-31 15:11:43 +02:00
Eladash 96d31cf64e IdManager.h: Savestate fix 2023-10-02 15:38:58 +03:00
oltolm d062fc1d31 sys_net.cpp: fix compiler warning 2023-08-15 20:56:39 +02:00
Eladash 9ff91c29f2 Invalidate Savestates 2023-07-23 17:58:54 +03:00
RipleyTom c98158b460 Add buf_to_hexstring 2023-03-18 01:51:35 +01:00
RipleyTom 6186ac0245 rpcn: signaling handler improvements & upnp
Simplify signaling by making Matching2 a layer over normal signaling.
Implements UPNP port forwarding
Implement sceNpMatching2AbortRequest
Fix reported bw in sceNpUtil
Hack for Fat Princess binding udp on 3658
Reenable CB for sceNpBasicAddPlayersHistoryAsync
Misc fixes
2023-02-21 15:41:41 +01:00
Margen67 5bb89328d0 Remove whitespace 2023-02-15 08:58:02 +01:00
RipleyTom 737fbf661a Add more disconnected limitations in sys_net 2023-02-04 20:33:21 +01:00
Elad Ashkenazi 0946e5945f
VSH Improvements (#13172)
* sys_prx: Implement PRX LIB register syscall

* VSH: partial log spam fix

* sys_process reboot fix

* Implement sys_memory_container_destroy_parent_with_childs

* sys_net: Implement SO_RCVTIMEO/SO_SENDTIMEO

* VSH: Implement sys_rsx_context_free

* PPU LLVM: distinguish PPU cache exec also by address

Fixes referencing multiple PRX.

* UI: Do not report size of apps inside /dev_flash
2023-01-09 20:03:01 +03:00
Eladash 9f3f619774 Minor cleanup 2022-10-23 13:06:57 +02:00
Eladash d25d1ecb3a LV2: Avoid using multi-variable atomic waiting on cpu_thread::state wait 2022-10-04 16:28:34 +03:00
RipleyTom eea73deab3 RPCN v0.6 2022-09-27 23:39:54 +03:00
cohaereo 2655255d4d sys_net: Implement sys_net_bnet_sendmsg for native sockets 2022-09-25 18:24:47 +03:00
Eladash 34bae90820 LV2: Move nearly all notifications out of all mutex scopes including IDM 2022-08-07 20:23:54 +03:00
Elad Ashkenazi 88b80ebdf5
sys_net: Fix missing locks in some syscalls (#12459) 2022-08-04 21:31:34 +03:00
Eladash c0369b2e10 sys_net: Implement sys_net_abort 2022-07-17 14:53:03 +03:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
RipleyTom 3dc9a8b980 fix lv2_socket_native::accept 2022-05-23 07:36:51 +02:00
RipleyTom d6b0263144 sys_net fixes
Fix lv2_socket_p2ps::connect
Fix sys_net_bnet_poll
2022-04-14 09:18:58 +02:00
RipleyTom f8ea50caae sys_net: Fix return values being tagged as errors 2022-04-10 11:15:41 +02:00
RipleyTom c06cb4664a Various sys_net improvements
Implement P2PS select
Adjust P2P sendto return value
2022-04-09 21:56:53 +02:00
RipleyTom 855b23b3fe re-add scope to sys_net_bnet_poll 2022-04-09 20:24:08 +03:00
RipleyTom 72b2876b6a
sys_net refactor (#11740) 2022-04-09 14:51:22 +02:00
RipleyTom 987166f4da Fix IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP 2022-02-06 20:37:12 +01:00
RipleyTom 58fdf58150 Force close socket in sys_net_bnet_close 2022-01-17 21:27:20 +01:00
Nekotekina 580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
clienthax 6837370a62 Handle SYS_NET_IPPROTO_IP get/setsockopt
Improve net logging.

Should allow latest vsh to load (Depending on windows version apparantly..)
2021-12-27 20:58:09 +03:00
RipleyTom c194804fec NP: Implement sceNpBasicGetFriendListEntry 2021-11-08 13:10:40 +03:00
RipleyTom d41e405420 NP: Cache Manager + improvements 2021-11-08 13:10:40 +03:00
RipleyTom 516cb959cb rpcn: new allocator + refactoring of np_handler 2021-11-08 13:10:40 +03:00
Nick Renieris b70f08d850 The Velocity Improvements: RoomData/RoomMemberData commands & fixes
modules/np2: Correct some SceNpMaching2 ptr type endianness
np/handler: Use STL .contains() method
Ignore USECRYPTO & USESIGNATURE in recvfrom/sendto
Implement RoomData/RoomMemberData commands
2021-11-08 13:10:40 +03:00
RipleyTom 683c061e60 sys_net: getsockname on unbound p2p socket fix 2021-10-16 11:41:20 +02:00
RipleyTom 0e625e193e sys_net: redirects 0.0.0.0 packets on windows 2021-10-16 11:41:20 +02:00
RipleyTom ea9dc9317d rpcn v0.4.0 2021-10-11 22:20:20 +02:00
Eladash fe0c164de2 sys_net: Anti-log spam enhancement 2021-09-04 11:58:59 +02:00
Megamouse 0debcfed0a Silence some warnings 2021-09-02 19:39:42 +02:00
Justin Lewis c13a46b07b
Fix warnings about using deprecated inet_ntoa function (#10698)
* Replaced inet_ntoa with inet_ntop.

The warning in question is: "Warning	C4996	'inet_ntoa': Use
inet_ntop() or InetNtop() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS"
2021-08-18 07:16:38 +03:00
Megamouse 430fd759fe sys_net: add missing range checks 2021-08-08 21:06:07 +02:00