|
|
@@ -1,129 +0,0 @@
|
|
|
-name: Setup SUSFS Patches
|
|
|
-description: Clone and apply SUSFS patches with version-specific fixes
|
|
|
-inputs:
|
|
|
- android_version:
|
|
|
- description: 'Android version (e.g., android15)'
|
|
|
- required: true
|
|
|
- kernel_version:
|
|
|
- description: 'Kernel version (e.g., 6.6)'
|
|
|
- required: true
|
|
|
- os_patch_level:
|
|
|
- description: 'OS patch level (e.g., 2024-07)'
|
|
|
- required: true
|
|
|
- sublevel:
|
|
|
- description: 'Kernel sublevel'
|
|
|
- required: true
|
|
|
-
|
|
|
-runs:
|
|
|
- using: composite
|
|
|
- steps:
|
|
|
- - name: Apply Android 12 5.10 Fixes
|
|
|
- if: inputs.android_version == 'android12' && inputs.kernel_version == '5.10'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
- SUSFS_VERSION=${{ env.SUSFS_VERSION }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 209 ]]; then
|
|
|
- sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
|
|
|
- fi
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 117 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a12-5.10/fdinfo.c.patch ./
|
|
|
- patch -p1 < fdinfo.c.patch
|
|
|
- fi
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 43 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a12-5.10/base.c.patch ./
|
|
|
- patch -p1 < base.c.patch
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Apply Android 13 5.10 Fixes
|
|
|
- if: inputs.android_version == 'android13' && inputs.kernel_version == '5.10'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
- SUSFS_VERSION=${{ env.SUSFS_VERSION }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 107 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a13-5.10/fdinfo.c.patch ./
|
|
|
- patch -p1 < fdinfo.c.patch
|
|
|
- fi
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 209 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
|
|
|
- sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Apply Android 13 5.15 Fixes
|
|
|
- if: inputs.android_version == 'android13' && inputs.kernel_version == '5.15'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
- SUSFS_VERSION=${{ env.SUSFS_VERSION }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 41 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a13-5.15/namespace.c.patch ./
|
|
|
- patch -p1 < namespace.c.patch
|
|
|
-
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a13-5.15/fdinfo.c.patch ./
|
|
|
- patch -p1 < fdinfo.c.patch
|
|
|
-
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a13-5.15/open.c.patch ./
|
|
|
- patch -p1 < open.c.patch
|
|
|
-
|
|
|
- sed -i 's|i_uid_into_mnt(i_user_ns(&fi->inode), &fi->inode).val|fi->inode.i_uid.val|g' fs/susfs.c
|
|
|
- sed -i 's|i_uid_into_mnt(i_user_ns(inode), inode).val|inode->i_uid.val|g' fs/susfs.c
|
|
|
- fi
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
|
|
|
- sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Apply Android 14 5.15 Fixes
|
|
|
- if: inputs.android_version == 'android14' && inputs.kernel_version == '5.15'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
|
|
|
- sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Apply Android 14 6.1 Fixes
|
|
|
- if: inputs.android_version == 'android14' && inputs.kernel_version == '6.1'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
- SUSFS_VERSION=${{ env.SUSFS_VERSION }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 0 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a14-6.1/base.c.patch ./
|
|
|
- patch -p1 < base.c.patch
|
|
|
- fi
|
|
|
-
|
|
|
- if grep -q 'goto show_pad;' ./fs/proc/task_mmu.c; then
|
|
|
- sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Apply Android 15 6.6 Fixes
|
|
|
- if: inputs.android_version == 'android15' && inputs.kernel_version == '6.6'
|
|
|
- shell: bash
|
|
|
- working-directory: ${{ github.workspace }}/kernel/common
|
|
|
- run: |
|
|
|
- SUBLEVEL=${{ env.SUBLEVEL }}
|
|
|
- SUSFS_VERSION=${{ env.SUSFS_VERSION }}
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 92 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a15-6.6/base.c.patch ./
|
|
|
- patch -p1 < base.c.patch
|
|
|
- fi
|
|
|
-
|
|
|
- if [[ "$SUBLEVEL" -le 58 ]]; then
|
|
|
- cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/${SUSFS_VERSION}/a15-6.6/task_mmu.c.patch ./
|
|
|
- patch -p1 < task_mmu.c.patch
|
|
|
- fi
|