diff --git a/.github/workflows/build-ksu-next.yml b/.github/workflows/build-ksu-next.yml index 48e4b16e..658d65fd 100644 --- a/.github/workflows/build-ksu-next.yml +++ b/.github/workflows/build-ksu-next.yml @@ -224,6 +224,27 @@ jobs: echo "No 70_ patch needed" fi + WILDFIX="$GITHUB_WORKSPACE/$VERSION_DIR/KernelSU-Next/patches/wildkernels" + if [ -d "$WILDFIX" ]; then + echo "Applying WildKernels SUSFS fix patches..." + for P in \ + fix_Makefile.patch \ + fix_ksu_c.patch \ + fix_ksud_c.patch \ + fix_supercalls_c.patch \ + fix_sucompat_c.patch \ + fix_kernel_umount_c.patch \ + fix_rules_c.patch; do + if [ -f "$WILDFIX/$P" ]; then + echo " → $P" + patch -p1 --no-backup-if-mismatch < "$WILDFIX/$P" || \ + echo "::warning::WildKernels patch $P had issues" + fi + done + else + echo "No WildKernels patches directory found — skipping" + fi + - name: Apply ZeroMount Patch if: inputs.add_zeromount && inputs.add_susfs working-directory: ${{ env.KERNEL_ROOT }}/common diff --git a/android14-6.1/KernelSU-Next/patches/50_add_susfs_in_gki-android14-6.1.patch b/android14-6.1/KernelSU-Next/patches/50_add_susfs_in_gki-android14-6.1.patch index 3ba29202..df24c37f 100644 --- a/android14-6.1/KernelSU-Next/patches/50_add_susfs_in_gki-android14-6.1.patch +++ b/android14-6.1/KernelSU-Next/patches/50_add_susfs_in_gki-android14-6.1.patch @@ -1085,7 +1085,7 @@ new file mode 100644 +#include +#include + -+#define SUSFS_VERSION "v2.0.0" ++#define SUSFS_VERSION "v2.1.0" +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) +#define SUSFS_VARIANT "NON-GKI" +#else diff --git a/android14-6.1/KernelSU-Next/patches/51_enhanced_susfs-android14-6.1.patch b/android14-6.1/KernelSU-Next/patches/51_enhanced_susfs-android14-6.1.patch index 5d0f0d64..49a5a96c 100644 --- a/android14-6.1/KernelSU-Next/patches/51_enhanced_susfs-android14-6.1.patch +++ b/android14-6.1/KernelSU-Next/patches/51_enhanced_susfs-android14-6.1.patch @@ -1,7 +1,7 @@ diff '--color=auto' -ruN post-upstream/fs/Kconfig work-50/fs/Kconfig --- post-upstream/fs/Kconfig 2026-03-07 16:32:21.906120792 +0100 +++ work-50/fs/Kconfig 2026-03-07 16:47:56.973232698 +0100 -@@ -387,4 +387,34 @@ +@@ -387,4 +387,58 @@ config IO_WQ bool @@ -34,6 +34,30 @@ diff '--color=auto' -ruN post-upstream/fs/Kconfig work-50/fs/Kconfig + help + Fixes upstream SUSFS concurrency and error-handling bugs. + Disable to match exact upstream behavior. ++ ++config KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT ++ bool "Auto-add KSU default mounts to sus_mount" ++ depends on KSU_SUSFS_SUS_MOUNT ++ default y ++ help ++ Automatically adds KernelSU default bind mounts to the ++ sus_mount list so they are hidden without manual configuration. ++ ++config KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT ++ bool "Auto-add module bind mounts to sus_mount" ++ depends on KSU_SUSFS_SUS_MOUNT ++ default y ++ help ++ Automatically adds module bind mounts to the sus_mount list ++ so they are hidden without manual configuration. ++ ++config KSU_SUSFS_UID_GATED_HIDING ++ bool "UID-gated hiding (v2.1.0+)" ++ depends on KSU_SUSFS ++ default y ++ help ++ Gates sus_path and sus_mount hiding behind a per-UID allowlist. ++ Requires susfs v2.1.0 or newer kernel patches. + endmenu diff '--color=auto' -ruN post-upstream/fs/namei.c work-50/fs/namei.c @@ -1956,7 +1980,7 @@ diff '--color=auto' -ruN post-upstream/include/linux/susfs.h work-50/include/lin +struct super_block; + - #define SUSFS_VERSION "v2.0.0" + #define SUSFS_VERSION "v2.1.0" #if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) #define SUSFS_VARIANT "NON-GKI" @@ -54,7 +56,7 @@ @@ -2010,7 +2034,7 @@ diff '--color=auto' -ruN post-upstream/include/linux/susfs.h work-50/include/lin #endif /* spoof_uname */ -@@ -217,6 +240,13 @@ +@@ -242,7 +263,14 @@ void susfs_start_sdcard_monitor_fn(void); @@ -2024,6 +2048,8 @@ diff '--color=auto' -ruN post-upstream/include/linux/susfs.h work-50/include/lin /* susfs_init */ void susfs_init(void); +-#endif ++#endif // #ifndef KSU_SUSFS_H diff '--color=auto' -ruN post-upstream/include/linux/susfs_def.h work-50/include/linux/susfs_def.h --- post-upstream/include/linux/susfs_def.h 2026-03-07 16:32:28.738199507 +0100 +++ work-50/include/linux/susfs_def.h 2026-03-07 16:40:08.359700772 +0100 diff --git a/android14-6.1/defconfig.fragment b/android14-6.1/defconfig.fragment index efbe530c..68eb2cf5 100644 --- a/android14-6.1/defconfig.fragment +++ b/android14-6.1/defconfig.fragment @@ -46,6 +46,9 @@ CONFIG_KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS=y CONFIG_KSU_SUSFS_UNICODE_FILTER=y CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT=y CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT=y +CONFIG_KSU_SUSFS_UID_GATED_HIDING=y +CONFIG_KSU_SUSFS_HIDDEN_NAME=y +CONFIG_KSU_SUSFS_HARDENED=y # [zram] CONFIG_ZSMALLOC=y