Skip to content

Commit f57619f

Browse files
committed
Add Ptrace fix for kernel versions less than 5.16
1 parent b65ac1f commit f57619f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ jobs:
176176
sed -i '/#include <trace\/hooks\/blk.h>/a #include <trace/hooks/fs.h>' ./fs/namespace.c
177177
fi
178178
patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
179+
180+
KERNEL_VERSION="${{ inputs.kernel_version }}"
181+
MIN_VERSION="5.16"
182+
183+
if [ "$(printf '%s\n' "$KERNEL_VERSION" "$MIN_VERSION" | sort -V | head -n1)" = "$KERNEL_VERSION" ]; then
184+
echo "Patching ptrace!"
185+
curl -Ls https://raw.githubusercontent.com/fatalcoder524/kernel_patches_additional/refs/heads/main/ptrace.patch | patch -p1 -F 3
186+
else
187+
echo "Kernel >= $MIN_VERSION, skipping ptrace patch"
188+
fi
179189
180190
- name: Apply KSUN Hooks
181191
run: |

0 commit comments

Comments
 (0)