aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiko Asakura2021-03-16 16:44:50 -0400
committerReiko Asakura2021-03-16 16:44:50 -0400
commit474b5e343201ae3f6a1be928260d9df0f74568a9 (patch)
tree57e42ad56e991b28b8b3a1c19725c3171fe3077c
parentFix missing #include <stddef.h> (diff)
downloadtaihen-master.tar.gz
Update for Vita Development Suite Libraries 0.3.0HEADmaster
-rw-r--r--patches.c4
-rw-r--r--taihen-user.c26
-rw-r--r--taihen.c2
3 files changed, 16 insertions, 16 deletions
diff --git a/patches.c b/patches.c
index 2c80680..619075d 100644
--- a/patches.c
+++ b/patches.c
@@ -296,7 +296,7 @@ static int tai_hook_function(struct slab_chain *slab, void *target_func, const v
uargs.pid = slab->pid;
uargs.hook = &hook;
uargs.saved = (struct substitute_function_hook_record **)saved;
- ret = sceKernelRunWithStack(0x4000, do_hooking, &uargs);
+ ret = sceKernelExtendKernelStack(0x4000, do_hooking, &uargs);
LOG("Done hooking");
if (ret != SUBSTITUTE_OK) {
LOG("libsubstitute error: %s", substitute_strerror(ret));
@@ -315,7 +315,7 @@ static int tai_hook_function(struct slab_chain *slab, void *target_func, const v
static int tai_unhook_function(void *saved) {
int ret;
LOG("Calling substitute_free_hooks");
- ret = sceKernelRunWithStack(0x4000, do_unhooking, saved);
+ ret = sceKernelExtendKernelStack(0x4000, do_unhooking, saved);
if (ret != SUBSTITUTE_OK) {
LOG("libsubstitute error: %s", substitute_strerror(ret));
return TAI_ERROR_HOOK_ERROR;
diff --git a/taihen-user.c b/taihen-user.c
index 03ad105..a1acf65 100644
--- a/taihen-user.c
+++ b/taihen-user.c
@@ -382,7 +382,7 @@ SceUID taiLoadKernelModule(const char *path, int flags, void *opt) {
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
if (opt == NULL) {
if (sceKernelStrncpyUserToKernel(k_path, (uintptr_t)path, MAX_NAME_LEN) < MAX_NAME_LEN) {
state = shift_tpidruro();
@@ -427,7 +427,7 @@ int taiStartKernelModuleForUser(SceUID modid, tai_module_args_t *args, void *opt
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -481,7 +481,7 @@ SceUID taiLoadStartKernelModuleForUser(const char *path, tai_module_args_t *args
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -533,7 +533,7 @@ SceUID taiLoadStartModuleForPidForUser(const char *path, tai_module_args_t *args
int state;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -588,7 +588,7 @@ int taiStopKernelModuleForUser(SceUID modid, tai_module_args_t *args, void *opt,
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -642,7 +642,7 @@ int taiUnloadKernelModule(SceUID modid, int flags, void *opt) {
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
if (opt == NULL) {
kid = sceKernelKernelUidForUserUid(pid, modid);
if (kid >= 0) {
@@ -687,7 +687,7 @@ int taiStopUnloadKernelModuleForUser(SceUID modid, tai_module_args_t *args, void
int state;
pid = sceKernelGetProcessId();
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -744,7 +744,7 @@ int taiStopModuleForPidForUser(SceUID modid, tai_module_args_t *args, void *opt,
SceUID kid;
int state;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -796,7 +796,7 @@ int taiUnloadModuleForPid(SceUID pid, SceUID modid, int flags, void *opt) {
int ret;
int state;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
if (opt == NULL) {
kid = sceKernelKernelUidForUserUid(pid, modid);
if (kid >= 0) {
@@ -839,7 +839,7 @@ int taiStopUnloadModuleForPidForUser(SceUID modid, tai_module_args_t *args, void
SceUID kid;
int state;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
kargs.size = 0;
sceKernelMemcpyUserToKernel(&kargs, (uintptr_t)args, sizeof(kargs));
if (kargs.size == sizeof(kargs)) {
@@ -917,7 +917,7 @@ int taiGetModuleExportFunc(const char *modname, uint32_t libnid, uint32_t funcni
int taiMemcpyUserToKernel(void *kernel_dst, const void *user_src, size_t len) {
int ret;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
ret = 0;
} else {
ret = TAI_ERROR_NOT_ALLOWED;
@@ -946,7 +946,7 @@ int taiMemcpyUserToKernel(void *kernel_dst, const void *user_src, size_t len) {
int taiMemcpyKernelToUser(void *user_dst, const void *kernel_src, size_t len) {
int ret;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
ret = 0;
} else {
ret = TAI_ERROR_NOT_ALLOWED;
@@ -970,7 +970,7 @@ int taiMemcpyKernelToUser(void *user_dst, const void *kernel_src, size_t len) {
int taiReloadConfig(void) {
int ret;
- if (sceSblACMgrIsShell(0)) {
+ if (sceSblACMgrIsSystemProgram(0)) {
ret = taiReloadConfigForKernel(0, 0);
} else {
ret = TAI_ERROR_NOT_ALLOWED;
diff --git a/taihen.c b/taihen.c
index 1e170b7..07af827 100644
--- a/taihen.c
+++ b/taihen.c
@@ -367,7 +367,7 @@ int module_start(SceSize argc, const void *args) {
return SCE_KERNEL_START_FAILED;
}
if (sceSblAimgrIsGenuineDolce() && sceKernelSysrootGetShellPid() < 0) {
- kbl_param = sceKernelGetSysrootBuffer();
+ kbl_param = sceKernelSysrootGetKblParam();
if (*(uint32_t*)(kbl_param + 0xC4) == 0xFF1C && *(uint32_t*)(kbl_param + 0xD8) == 0x8) {
g_hooks[0] = taiHookFunctionImportForKernel(KERNEL_PID, &g_is_safe_mode_hook, "SceUsbServ", 0x2ED7F97A, 0x834439A7, is_safe_mode_patched);
sceSysconCtrlDolceLED(1);