From 8eeb263bdb92e213ed8ba34be60eb4a52c21ad51 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Tue, 7 Oct 2025 16:44:24 +0800 Subject: [PATCH] kernel & KernelSU: More Optimization on SUS_MOUNT and... kernel & KernelSU: More Optimization on SUS_MOUNT and AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT; Dropped HAS_MAGIC_MOUNT feature in Kconfig - In order to stop more performance loss, the changes here is not to monitor any ksu mounts anymore during/after boot-completed stage, since monitoring the free of mnt_id and reordering the mnt_id takes some CPU cycles already. - HAS_MAGIC_MOUNT is not needed anymore and catching magic mounts can be simplifed by checking whether 1. It is bind mount 2. Its mnt_devname is "KSU" 3. It is a directory 4. mounted path begins with "/debug_ramdisk/workdir/" - Some sus bind mounts still cannot be catched with these changes, like revanced youtube module, since it bind mounts after the user data is decrypted, at this point user may need to manually add the mounted path to try_umount. Co-authored-by: simonpunk --- kernel/Kconfig | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/Kconfig b/kernel/Kconfig index 04c7ce1e..edcff6c3 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -101,14 +101,6 @@ config KSU_SUSFS help Patch and Enable SUSFS to kernel with KernelSU. -config KSU_SUSFS_HAS_MAGIC_MOUNT - bool "Say yes if the current KernelSU repo has magic mount implemented (default y)" - depends on KSU_SUSFS - default y - help - - Enable to indicate that the current SUSFS kernel supports the auto hide features for 5ec1cff's Magic Mount KernelSU - - Every mounts from /debug_ramdisk/workdir will be treated as magic mount and processed differently by susfs - config KSU_SUSFS_SUS_PATH bool "Enable to hide suspicious path (NOT recommended)" depends on KSU_SUSFS