Explorar el Código

feat(action): add Android 13 5.10 fixes for sublevel check in kernel configuration

Co-authored-by: Copilot <copilot@github.com>
TheWildJames hace 4 meses
padre
commit
a89cda3890

+ 1 - 1
.github/actions/kernel-fixes/action.yml

@@ -53,7 +53,7 @@ runs:
         fi
 
     - shell: bash
-      if: ${{ inputs.kernel_version == '5.10' && inputs.android_version == 'android12' && inputs.sublevel == 226 }}
+      if: ${{ (inputs.kernel_version == '5.10' && inputs.android_version == 'android12' && inputs.sublevel == 226) || (inputs.kernel_version == '5.10' && inputs.android_version == 'android13' && inputs.sublevel == 223) }}
       working-directory: ${{ github.workspace }}/kernel/common
       run: |
         sed -i 's/\s*vm_flags_clear(new_vma, VM_PAD_MASK);/                new_vma->vm_flags \&= ~VM_PAD_MASK;/' mm/mmap.c

+ 48 - 0
.github/actions/susfs/action.yml

@@ -196,6 +196,54 @@ runs:
         ) fs/notify/fdinfo.c
         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: |
+        if [ "${{ inputs.sublevel }}" -le "107" ]; then
+        sed -i '/size_t this_len = min_t(size_t, count, PAGE_SIZE);/r'<(cat <<'EOF'
+        #ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
+        		mnt = real_mount(file->f_path.mnt);
+        		if (mnt->mnt_id >= DEFAULT_KSU_MNT_ID &&
+        			likely(susfs_is_current_proc_umounted()))
+        		{
+        			struct path path;
+        			char *pathname = kmalloc(PAGE_SIZE, GFP_KERNEL);
+        			char *dpath;
+        			if (!pathname) {
+        				goto orig_flow;
+        			}
+        			dpath = d_path(&file->f_path, pathname, PAGE_SIZE);
+        			if (!dpath) {
+        				goto out_kfree;
+        			}
+        			if (kern_path(dpath, 0, &path)) {
+        				goto out_kfree;
+        			}
+        			if (!path.dentry->d_inode) {
+        				goto out_path_put;
+        			}
+        			seq_printf(m, "inotify wd:%x ino:%lx sdev:%x mask:%x ignored_mask:0 ",
+        					inode_mark->wd, path.dentry->d_inode->i_ino, path.dentry->d_inode->i_sb->s_dev,
+        					inotify_mark_user_mask(mark));
+        			show_mark_fhandle(m, path.dentry->d_inode);
+        			seq_putc(m, '\n');
+        			path_put(&path);
+        			kfree(pathname);
+        			iput(inode);
+        			return;
+        out_path_put:
+        			path_put(&path);
+        out_kfree:
+        			kfree(pathname);
+        		}
+        orig_flow:
+        #endif // #ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
+        EOF
+        ) fs/notify/fdinfo.c
+        fi
+
     - name: Apply Android 14 6.1 Fixes
       if: inputs.android_version == 'android14' && inputs.kernel_version == '6.1'
       shell: bash

+ 3 - 3
.github/workflows/build.yml

@@ -182,11 +182,11 @@ jobs:
 
     - name: Scan and collect patch rejects
       id: scan
-      if: ${{ always() && matrix.variant == 'Normal' }}
+      if: ${{ always() && inputs.variant == 'Normal' }}
       uses: ./.github/actions/scan-patch-rejects
-
+        
     - name: Upload Rejects
-      if: ${{ always() && matrix.variant == 'Normal' }}
+      if: ${{ always() && inputs.variant == 'Normal' }}
       uses: actions/upload-artifact@v7
       with:
         name: ${{ steps.extract.outputs.file_name }}-Rejects