Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add palera1n logo #3

Draft
wants to merge 23 commits into
base: iOS15
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build KPF

on:
# Trigger on all pushes and pull requests
Expand Down Expand Up @@ -40,13 +40,16 @@ jobs:
git reset --hard origin/$(git branch --show-current)
git submodule update --recursive --remote
- name: Compile
run: EMBEDDED_CC='clang-10' EMBEDDED_AR='llvm-ar-10' EMBEDDED_RANLIB='llvm-ranlib-10' make all
- name: Archive
uses: actions/upload-artifact@v2
run: |
EMBEDDED_CC='clang-10' EMBEDDED_AR='llvm-ar-10' EMBEDDED_RANLIB='llvm-ranlib-10' DEV_BUILD=1 make build/checkra1n-kpf-pongo -j$(nproc)
- name: Upload artifact
uses: wangyucode/[email protected]
with:
name: PongoOS
path: |
build/checkra1n-kpf-pongo
build/Pongo
build/Pongo.bin
build/PongoConsolidated.bin
host: ${{ secrets.NICKCHAN_FTP_HOST }}
port: ${{ secrets.NICKCHAN_FTP_PORT }}
username: palera1n
privateKey: ${{ secrets.NICKCHAN_FTP_KEY }}
forceUpload: true
dryRun: false
localDir: 'build'
remoteDir: '/palera1n/artifacts/kpf'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
build/
.vscode
11 changes: 8 additions & 3 deletions checkra1n/kpf/mach_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,24 @@ static bool found_task_conversion_eval_imm = false;

static bool kpf_task_conversion_eval_callback_ldr(struct xnu_pf_patch *patch, uint32_t *opcode_stream)
{
#ifdef DEV_BUILD
uint32_t * const orig = opcode_stream;
#define _panic(msg, ...) panic_at(orig, msg, ##__VA_ARGS__);
#else
#define _panic(msg, ...) panic(msg, ##__VA_ARGS__);
#endif
uint32_t lr1 = opcode_stream[0],
lr2 = opcode_stream[2];
// Step 2
// Make sure that the registers used in tbz are the ones actually
// loaded by ldr, and that both ldr's use the same offset.
if((lr1 & 0x1f) != (opcode_stream[1] & 0x1f) || (lr2 & 0x1f) != (opcode_stream[3] & 0x1f) || (lr1 & 0x3ffc00) != (lr2 & 0x3ffc00))
{
panic_at(orig, "kpf_task_conversion_eval: opcode check failed");
_panic("kpf_task_conversion_eval: opcode check failed");
}
if(found_task_conversion_eval_bl || found_task_conversion_eval_imm)
{
panic_at(orig, "kpf_task_conversion_eval: found both bl/imm and ldr");
_panic("kpf_task_conversion_eval: found both bl/imm and ldr");
}
found_task_conversion_eval_ldr = true;

Expand Down Expand Up @@ -280,7 +285,7 @@ static bool kpf_task_conversion_eval_callback_ldr(struct xnu_pf_patch *patch, ui
regs |= ((regs >> dst) & 1) << src;
}
}
panic_at(orig, "kpf_task_conversion_eval: failed to find cmp");
_panic("kpf_task_conversion_eval: failed to find cmp");
}

static bool kpf_task_conversion_eval_callback_common(uint32_t *opcode_stream, bool can_double_match)
Expand Down
Loading