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 <simonpunk2016@gmail.com>
This commit is contained in:
ShirkNeko
2025-10-07 16:44:24 +08:00
parent 5e28594e3d
commit 8eeb263bdb

View File

@@ -101,14 +101,6 @@ config KSU_SUSFS
help help
Patch and Enable SUSFS to kernel with KernelSU. 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 config KSU_SUSFS_SUS_PATH
bool "Enable to hide suspicious path (NOT recommended)" bool "Enable to hide suspicious path (NOT recommended)"
depends on KSU_SUSFS depends on KSU_SUSFS