forked from bmax121/KernelPatch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Embed KPM support, add KPM control interface 2. Re-patch kernel image support 3. Start supporting KALLSYMS_ALL=n, but still some issues 4. bug fix
- Loading branch information
Showing
85 changed files
with
5,790 additions
and
1,621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build KPM-DEMO CI | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
paths: | ||
- ".github/workflows/build_kpm_demo.yml" | ||
- "kernel/**" | ||
- "kpm-demo/**" | ||
- "version" | ||
pull_request: | ||
branches: ["main", "dev"] | ||
paths: | ||
- ".github/workflows/build_kpm_demo.yml" | ||
- "kernel/**" | ||
- "kpm-demo/**" | ||
- "version" | ||
|
||
jobs: | ||
Build-kpm-demos: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
- name: Generate version | ||
id: parse_version | ||
run: | | ||
MAJOR=$(grep '#define MAJOR' version | awk '{print $3}') | ||
MINOR=$(grep '#define MINOR' version | awk '{print $3}') | ||
PATCH=$(grep '#define PATCH' version | awk '{print $3}') | ||
VERSION="$MAJOR.$MINOR.$PATCH" | ||
echo "Generated Version: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Extract branch name | ||
shell: bash | ||
id: extract_branch | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
|
||
- name: Install Compiler | ||
run: | | ||
curl -o arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz | ||
tar -Jxf arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf.tar.xz | ||
- name: Build kpimg | ||
run: | | ||
export TARGET_COMPILE=`pwd`/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf- | ||
cd kpm-demo | ||
cd hello | ||
make | ||
mv hello.kpm hello-demo.kpm | ||
cd ../inlinehook | ||
make | ||
mv inlinehook.kpm inlinehook-demo.kpm | ||
cd ../syscallhook | ||
make | ||
mv syscallhook.kpm syscallhook-demo.kpm | ||
- name: Release | ||
uses: ncipollo/release-action@v1.12.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.parse_version.outputs.VERSION }}-${{ steps.extract_branch.outputs.branch }} | ||
artifacts: | | ||
kpm-demo/hello/hello-demo.kpm | ||
kpm-demo/inlinehook/inlinehook-demo.kpm | ||
kpm-demo/syscallhook/syscallhook-demo.kpm | ||
allowUpdates: true | ||
replacesArtifacts: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.