From 9e996d1d9d186e44fc9ee03cce4a3214cf485c48 Mon Sep 17 00:00:00 2001 From: Rifat Azad Date: Mon, 9 Dec 2024 17:26:51 +0600 Subject: [PATCH] Revert "kernel: susfs: CONFIG_KSU_SUSFS_INFO syscall to get susfs version & variant" This reverts commit e1107e514dfdf74db76e581f27feb09c3dd6989a. --- kernel/Kconfig | 7 ------- kernel/Makefile | 3 --- kernel/core_hook.c | 43 ------------------------------------------- 3 files changed, 53 deletions(-) diff --git a/kernel/Kconfig b/kernel/Kconfig index be04a3fa..076c61dd 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -154,13 +154,6 @@ config KSU_SUSFS_SUS_SU - Only apps with root access granted by ksu manager are allowed to get root. - Also overlayfs is required. -config KSU_SUSFS_INFO - bool "Enable meta-data of susfs" - depends on KSU_SUSFS - default y - help - - Allow parsing meta-data of susfs version info. - endmenu endmenu diff --git a/kernel/Makefile b/kernel/Makefile index eb71dd5a..26c689ca 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -196,9 +196,6 @@ endif ifdef KSU_SUSFS_SUS_SU ccflags-y += -DKSU_SUSFS_SUS_SU endif -ifdef KSU_SUSFS_INFO -ccflags-y += -DKSU_SUSFS_INFO -endif else $(info -- You have not integrate susfs in your kernel.) $(info -- Read: https://gitlab.com/simonpunk/susfs4ksu) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 86f8d372..9cc12812 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -590,49 +590,6 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3, return 0; } #endif //#ifdef CONFIG_KSU_SUSFS_SUS_SU -#ifdef CONFIG_KSU_SUSFS_INFO - if (arg2 == CMD_SUSFS_SHOW_VERSION) { - const char *version = SUSFS_VERSION; - int error = 0; - - if (copy_to_user((void __user*)arg3, version, strlen(version) + 1)) { - pr_info("susfs: copy_to_user() failed\n"); - error = -EFAULT; - } - - if (copy_to_user((void __user*)arg5, version, strlen(version) + 1)) { - pr_info("susfs: copy_to_user() failed\n"); - error = -EFAULT; - } - - if (copy_to_user((void __user*)arg5 + strlen(version) + 1, &error, sizeof(error))) { - pr_info("susfs: copy_to_user() failed (error status)\n"); - } - - return 0; - } - - if (arg2 == CMD_SUSFS_SHOW_VARIANT) { - const char *variant = SUSFS_VARIANT; - int error = 0; - - if (copy_to_user((void __user*)arg3, variant, strlen(variant) + 1)) { - pr_info("susfs: copy_to_user() failed\n"); - error = -EFAULT; - } - - if (copy_to_user((void __user*)arg5, variant, strlen(variant) + 1)) { - pr_info("susfs: copy_to_user() failed\n"); - error = -EFAULT; - } - - if (copy_to_user((void __user*)arg5 + strlen(variant) + 1, &error, sizeof(error))) { - pr_info("susfs: copy_to_user() failed (error status)\n"); - } - - return 0; - } -#endif //#ifdef CONFIG_KSU_SUSFS_INFO } #endif //#ifdef CONFIG_KSU_SUSFS