Jelajahi Sumber

fix(susfs-patches): narrow fold_filemap stub to only 2024-07

The __fold_filemap_fixup_entry function was backported to the Android
common kernel starting in the 2024-08 os_patch_level. Only the 2024-07
kernel lacks it. Condition the stub on both sublevel <=30 AND
os_patch_level == 2024-07 so 2024-08+ kernels use the real declaration.
TheWildJames 1 bulan lalu
induk
melakukan
14e09d5c12
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      .github/actions/susfs-patches/action.yml

+ 3 - 1
.github/actions/susfs-patches/action.yml

@@ -104,7 +104,9 @@ runs:
         if [ "${{ inputs.sublevel }}" -le "30" ]; then
           echo "Applying taskmmu.c Android 15 6.6 Fake Patch"
           python3 -c 'import re;c=open("fs/proc/task_mmu.c").read();c=re.sub(r"(\t+\t\tif\s*\(\s*vma->vm_end\s*>\s*last_vma_end\s*\))\n(\t+\t\t\tsmap_gather_stats\(vma,\s*&mss,\s*last_vma_end\);)\n(\t+)\}",lambda m:m.group(1)+" {\n"+m.group(2)+"\n"+m.group(3)+"\t\tlast_vma_end = vma->vm_end;\n"+m.group(3)+"\t}\n"+m.group(3)+"}",c,count=1);open("fs/proc/task_mmu.c","w").write(c)'
-          echo "Adding __fold_filemap_fixup_entry stub for pre-2026 kernels"
+        fi
+        if [ "${{ inputs.sublevel }}" -le "30" ] && [ "${{ inputs.os_patch_level }}" = "2024-07" ]; then
+          echo "Adding __fold_filemap_fixup_entry stub for 2024-07 kernels"
           sed -i '/^#include <asm\/elf.h>$/i #ifndef __fold_filemap_fixup_entry\nstatic inline void __fold_filemap_fixup_entry(struct vma_iterator *iter, unsigned long *end) { }\n#endif /* __fold_filemap_fixup_entry */\n' fs/proc/task_mmu.c
         fi
         if [ "${{ inputs.sublevel }}" -le "92" ]; then