Skip to content

Commit b55979b

Browse files
authored
Merge branch 'opa334:2.x' into 2.x
2 parents 29cf998 + 314f7f2 commit b55979b

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ concurrency:
2525

2626
jobs:
2727
build:
28-
runs-on: macos-15
28+
runs-on: macos-latest
2929
steps:
30+
- name: Xcode Setup
31+
uses: maxim-lobanov/setup-xcode@v1
32+
with:
33+
xcode-version: latest-stable
34+
3035
- name: Checkout
3136
uses: actions/checkout@main
3237
with:

BaseBin/libjailbreak/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TARGET = libjailbreak.dylib
22

33
CC = clang
44

5-
CFLAGS = -framework Foundation -framework CoreServices -framework Security -framework IOKit -framework IOSurface -I../.include -I../_external/modules/litehook/src -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -arch arm64 -arch arm64e -miphoneos-version-min=15.0 -fobjc-arc -dynamiclib -install_name @loader_path/$(TARGET) -I$(shell brew --prefix)/opt/libarchive/include -g
5+
CFLAGS = -framework Foundation -framework CoreServices -framework Security -framework IOKit -framework IOSurface -I../.include -I../_external/modules/litehook/src -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -arch arm64 -arch arm64e -miphoneos-version-min=15.0 -fobjc-arc -dynamiclib -install_name @loader_path/$(TARGET) -I$(shell brew --prefix)/opt/libarchive/include -g -O2
66
LDFLAGS = -larchive -lbsm -L../.build -lchoma
77

88
sign: $(TARGET)

BaseBin/libjailbreak/src/kcall_arm64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// I don't like this as it breaks executing multiple threads at the same time
1010
// But as we don't even really do/support that currently anyways, it doesn't matter
1111
uint64_t getUserReturnThreadContext(void);
12-
extern uint64_t gUserReturnDidHappen;
12+
extern volatile uint64_t gUserReturnDidHappen;
1313

1414
#ifndef __arm64e__
1515

BaseBin/libjailbreak/src/translation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ struct tt_level arm_tt_level[4];
1717

1818
// Address translation physical <-> virtual
1919

20+
#define PTOV_TABLE_SIZE 8
2021
uint64_t phystokv(uint64_t pa)
2122
{
22-
const uint64_t PTOV_TABLE_SIZE = 8;
2323
struct ptov_table_entry {
2424
uint64_t pa;
2525
uint64_t va;

BaseBin/libjailbreak/src/util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,23 +862,23 @@ static void* worker_thread(void *arg)
862862
}
863863

864864
// A thread to alternately spin and sleep.
865+
#define ACTIVITY_WORKER_COUNT 10
865866
static void* activity_thread(void *arg)
866867
{
867868
volatile uint64_t *runCount = arg;
868869
struct mach_timebase_info tb;
869870
mach_timebase_info(&tb);
870871
const unsigned milliseconds = 40;
871-
const unsigned worker_count = 10;
872872
while (*runCount != 0) {
873873
// Spin for one period on multiple threads.
874874
uint64_t start = mach_absolute_time();
875875
uint64_t end = start + milliseconds * 1000 * 1000 * tb.denom / tb.numer;
876-
pthread_t worker[worker_count];
877-
for (unsigned i = 0; i < worker_count; i++) {
876+
pthread_t worker[ACTIVITY_WORKER_COUNT];
877+
for (unsigned i = 0; i < ACTIVITY_WORKER_COUNT; i++) {
878878
pthread_create(&worker[i], NULL, worker_thread, &end);
879879
}
880880
worker_thread(&end);
881-
for (unsigned i = 0; i < worker_count; i++) {
881+
for (unsigned i = 0; i < ACTIVITY_WORKER_COUNT; i++) {
882882
pthread_join(worker[i], NULL);
883883
}
884884
// Sleep for one period.

0 commit comments

Comments
 (0)