diff --git a/kernel/kpm/compact.c b/kernel/kpm/compact.c index 14cd2922..3b6b90af 100644 --- a/kernel/kpm/compact.c +++ b/kernel/kpm/compact.c @@ -42,7 +42,7 @@ __visible __section(".data") static struct CompactAddressSymbol address_symbol [ { "is_run_in_sukisu_ultra", (void*)1 } }; -__visible unsigned long sukisu_compact_find_symbol(const char* name) { +__visible __section(".text") unsigned long sukisu_compact_find_symbol(const char* name) { int i; unsigned long addr; @@ -62,5 +62,8 @@ __visible unsigned long sukisu_compact_find_symbol(const char* name) { return 0; } +__section(".text") long copy_to_user(void __user *to, const void *from, unsigned long n) { + return __copy_to_user(to, from, n); +} EXPORT_SYMBOL(sukisu_compact_find_symbol); diff --git a/kernel/kpm/kpm.c b/kernel/kpm/kpm.c index 1577c3ab..efda485e 100644 --- a/kernel/kpm/kpm.c +++ b/kernel/kpm/kpm.c @@ -132,7 +132,7 @@ EXPORT_SYMBOL(sukisu_kpm_version); EXPORT_SYMBOL(sukisu_kpm_control); noinline -int sukisu_handle_kpm(unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) +__section(".text") int sukisu_handle_kpm(unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) { if(arg2 == SUKISU_KPM_LOAD) { char kernel_load_path[256] = { 0 }; @@ -177,7 +177,7 @@ int sukisu_handle_kpm(unsigned long arg2, unsigned long arg3, unsigned long arg4 return 0; } -int sukisu_is_kpm_control_code(unsigned long arg2) { +__section(".text") int sukisu_is_kpm_control_code(unsigned long arg2) { return (arg2 >= CMD_KPM_CONTROL && arg2 <= CMD_KPM_CONTROL_MAX) ? 1 : 0; }