kernel & KernelSU: Deprecated add_try_umount cli, AUTO_ADD_SUS_KSU_DEFAULT_MOUNT and AUTO_ADD_SUS_BIND_MOUNT
Reason: - add_try_umount, AUTO_ADD_SUS_KSU_DEFAULT_MOUNT and AUTO_ADD_SUS_BIND_MOUNT are only used to flag the sus_mount bit on target inode, but actually none of the hooks are checking for this bit, so this is why these features should be no longer needed, and we only need to check for sus mnt_id to determine if it is a sus mount. Plus it takes more CPU cycle to check for the path and set the sus_mount flag during boot time Co-authored-by: simonpunk <simonpunk2016@gmail.com>
This commit is contained in:
@@ -42,12 +42,6 @@
|
||||
bool susfs_is_boot_completed_triggered = false;
|
||||
|
||||
extern bool susfs_is_umount_for_zygote_system_process_enabled;
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT
|
||||
extern bool susfs_is_auto_add_sus_bind_mount_enabled;
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT
|
||||
extern bool susfs_is_auto_add_sus_ksu_default_mount_enabled;
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT
|
||||
extern bool susfs_is_auto_add_try_umount_for_bind_mount_enabled;
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT
|
||||
@@ -61,20 +55,6 @@ static void susfs_on_post_fs_data(void) {
|
||||
}
|
||||
pr_info("susfs_is_umount_for_zygote_system_process_enabled: %d\n", susfs_is_umount_for_zygote_system_process_enabled);
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT
|
||||
if (!kern_path(DATA_ADB_NO_AUTO_ADD_SUS_BIND_MOUNT, 0, &path)) {
|
||||
susfs_is_auto_add_sus_bind_mount_enabled = false;
|
||||
path_put(&path);
|
||||
}
|
||||
pr_info("susfs_is_auto_add_sus_bind_mount_enabled: %d\n", susfs_is_auto_add_sus_bind_mount_enabled);
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT
|
||||
if (!kern_path(DATA_ADB_NO_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT, 0, &path)) {
|
||||
susfs_is_auto_add_sus_ksu_default_mount_enabled = false;
|
||||
path_put(&path);
|
||||
}
|
||||
pr_info("susfs_is_auto_add_sus_ksu_default_mount_enabled: %d\n", susfs_is_auto_add_sus_ksu_default_mount_enabled);
|
||||
#endif // #ifdef CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT
|
||||
#ifdef CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT
|
||||
if (!kern_path(DATA_ADB_NO_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT, 0, &path)) {
|
||||
susfs_is_auto_add_try_umount_for_bind_mount_enabled = false;
|
||||
@@ -1046,10 +1026,6 @@ int ksu_handle_sys_reboot(int magic1, int magic2, unsigned int cmd, void __user
|
||||
}
|
||||
#endif //#ifdef CONFIG_KSU_SUSFS_SUS_PATH
|
||||
#ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
|
||||
if (cmd == CMD_SUSFS_ADD_SUS_MOUNT) {
|
||||
susfs_add_sus_mount(arg);
|
||||
return 0;
|
||||
}
|
||||
if (cmd == CMD_SUSFS_HIDE_SUS_MNTS_FOR_ALL_PROCS) {
|
||||
susfs_set_hide_sus_mnts_for_all_procs(arg);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user