|
34 | 34 | #include <stdio.h> |
35 | 35 | #include <string.h> |
36 | 36 |
|
37 | | -extern uint32_t fsctl_shc[], fsctl_shc_vnode_open[], fsctl_shc_stolen_slowpath[], fsctl_shc_orig_bl[], fsctl_shc_vnode_close[], fsctl_shc_stolen_fastpath[], fsctl_shc_orig_b[], fsctl_shc_end[]; |
38 | | - |
39 | 37 | static bool do_bind_mounts = false; |
40 | 38 |
|
| 39 | +// not used in palera1n |
| 40 | +#if 0 |
| 41 | +extern uint32_t fsctl_shc[], fsctl_shc_vnode_open[], fsctl_shc_stolen_slowpath[], fsctl_shc_orig_bl[], fsctl_shc_vnode_close[], fsctl_shc_stolen_fastpath[], fsctl_shc_orig_b[], fsctl_shc_end[]; |
| 42 | + |
41 | 43 | static uint32_t *fsctl_patchpoint = NULL; |
42 | 44 | static uint64_t vnode_open_addr = 0, vnode_close_addr = 0; |
43 | 45 |
|
@@ -140,6 +142,7 @@ static void kpf_fsctl_dev_by_role_patch(xnu_pf_patchset_t *xnu_text_exec_patchse |
140 | 142 | }; |
141 | 143 | xnu_pf_maskmatch(xnu_text_exec_patchset, "vnode_open_close", vn_matches, vn_masks, sizeof(vn_masks)/sizeof(uint64_t), true, (void*)kpf_vnode_open_close_callback); |
142 | 144 | } |
| 145 | +#endif |
143 | 146 |
|
144 | 147 | static bool kpf_shared_region_root_dir_callback(struct xnu_pf_patch *patch, uint32_t *opcode_stream) |
145 | 148 | { |
@@ -250,7 +253,9 @@ static void kpf_bindfs_patches(xnu_pf_patchset_t *xnu_text_exec_patchset) |
250 | 253 | // iOS 15.0: Union mounts no longer work |
251 | 254 | if(do_bind_mounts) |
252 | 255 | { |
| 256 | +#if 0 |
253 | 257 | kpf_fsctl_dev_by_role_patch(xnu_text_exec_patchset); |
| 258 | +#endif |
254 | 259 | kpf_shared_region_root_dir_patch(xnu_text_exec_patchset); |
255 | 260 | } |
256 | 261 | } |
@@ -278,6 +283,7 @@ static void kpf_bindfs_finish(struct mach_header_64 *hdr) |
278 | 283 | palera1n_flags |= palerain_option_bind_mount; |
279 | 284 | } |
280 | 285 |
|
| 286 | +#if 0 |
281 | 287 | static uint32_t kpf_bindfs_size(void) |
282 | 288 | { |
283 | 289 | if(!do_bind_mounts) |
@@ -335,13 +341,16 @@ static uint32_t kpf_bindfs_emit(uint32_t *shellcode_area) |
335 | 341 |
|
336 | 342 | return fsctl_shc_end - fsctl_shc; |
337 | 343 | } |
| 344 | +#endif |
338 | 345 |
|
339 | 346 | kpf_component_t kpf_bindfs = |
340 | 347 | { |
341 | 348 | .init = kpf_bindfs_init, |
342 | 349 | .finish = kpf_bindfs_finish, |
| 350 | +#if 0 |
343 | 351 | .shc_size = kpf_bindfs_size, |
344 | 352 | .shc_emit = kpf_bindfs_emit, |
| 353 | +#endif |
345 | 354 | .patches = |
346 | 355 | { |
347 | 356 | { NULL, "__TEXT_EXEC", "__text", XNU_PF_ACCESS_32BIT, kpf_bindfs_patches }, |
|
0 commit comments