Skip to content

Commit 95bab83

Browse files
committed
kpf: fix 26.1 beta 2's launch_constriants
Signed-off-by: Nick Chan <[email protected]>
1 parent d7f3cbb commit 95bab83

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

checkra1n/kpf/launch_constraints.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ static void kpf_launch_constraints_patch(xnu_pf_patchset_t *patchset)
108108
0xfc000000,
109109
};
110110
xnu_pf_maskmatch(patchset, "launch_constraints", matches_184, masks_184, sizeof(matches_184)/sizeof(uint64_t), false, (void*)kpf_launch_constraints_callback);
111+
112+
uint64_t matches_261b2[] =
113+
{
114+
0x90000000, // adrp x0, ...
115+
0x91000000, // add x0, x0, ...
116+
0xa94003e0, // ldp x{0-15}, x{0-15}, [sp, ...]
117+
0xa90003e0, // stp x{0-15}, x{0-15}, [sp]
118+
0x94000000, // bl IOLog
119+
};
120+
uint64_t masks_261b2[] =
121+
{
122+
0x9f00001f,
123+
0xffc003ff,
124+
0xffc043f0,
125+
0xffffc3f0,
126+
0xfc000000,
127+
};
128+
xnu_pf_maskmatch(patchset, "launch_constraints", matches_261b2, masks_261b2, sizeof(matches_261b2)/sizeof(uint64_t), false, (void*)kpf_launch_constraints_callback);
111129
}
112130

113131
static void kpf_launch_constraints_init(struct mach_header_64 *hdr, xnu_pf_range_t *cstring, checkrain_option_t kpf_flags, checkrain_option_t checkra1n_flags)

0 commit comments

Comments
 (0)