-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Implement sceSysmoduleLoadModuleByNameInternal #4830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ee8ad2b
8d1a0e0
d6786b1
24e50f4
0bacf76
8fdf15a
b6eb071
728bc7b
15e7131
d1a868d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ | |
| #include "common/elf_info.h" | ||
| #include "common/logging/log.h" | ||
| #include "core/libraries/error_codes.h" | ||
| #include "core/libraries/kernel/file_system.h" | ||
| #include "core/libraries/kernel/kernel.h" | ||
| #include "core/libraries/kernel/orbis_error.h" | ||
| #include "core/libraries/kernel/process.h" | ||
| #include "core/libraries/libs.h" | ||
|
|
@@ -98,9 +100,22 @@ s32 PS4_SYSV_ABI sceSysmoduleLoadModule(OrbisSysModule id) { | |
| return result; | ||
| } | ||
|
|
||
| s32 PS4_SYSV_ABI sceSysmoduleLoadModuleByNameInternal() { | ||
| LOG_ERROR(Lib_SysModule, "(STUBBED) called"); | ||
| return ORBIS_OK; | ||
| s32 PS4_SYSV_ABI sceSysmoduleLoadModuleByNameInternal(char const* name, u64 args, void const* argp, | ||
| void const* popt, s32* res) { | ||
| LOG_ERROR(Lib_SysModule, "(DUMMY) called, name: {}", name); | ||
| std::string filename = std::string(name) + ".sprx"; | ||
| s32 exists; | ||
| using namespace Kernel; | ||
| std::string system_base = std::string("/") + sceKernelGetFsSandboxRandomWord(); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally think we should tie this into some allow/block list instead of relying on users making game-specific module folders for things calling this (even if it's only called by firmware stuff).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fine by me, do you have a list of safely LLEable modules loaded through this function perchance?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Been too long since I glanced at VSH, I forget what all it tries loading through this. |
||
| exists = posix_access((system_base + "/common/lib/" + filename).c_str(), 0); | ||
| if (exists == 0) | ||
| return sceKernelLoadStartModule((system_base + "/common/lib/" + filename).c_str(), args, | ||
| argp, 0, popt, res); | ||
| exists = posix_access((system_base + "/priv/lib/" + filename).c_str(), 0); | ||
| if (exists == 0) | ||
| return sceKernelLoadStartModule((system_base + "/priv/lib/" + filename).c_str(), args, argp, | ||
| 0, popt, res); | ||
| return ORBIS_KERNEL_ERROR_EINVAL; | ||
| } | ||
|
|
||
| s32 PS4_SYSV_ABI sceSysmoduleLoadModuleInternal(OrbisSysModuleInternal id) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.