Skip to content

Update routeMultiple -> routeMultipleLong for getProperty#122

Merged
vit9696 merged 5 commits into
acidanthera:masterfrom
Carnations-Botanica:master
May 12, 2026
Merged

Update routeMultiple -> routeMultipleLong for getProperty#122
vit9696 merged 5 commits into
acidanthera:masterfrom
Carnations-Botanica:master

Conversation

@royalgraphx

Copy link
Copy Markdown
Contributor

So, this probably was not expected to happen any time soon, or practically ever but I suddenly have the need to wrap/reroute __ZNK15IORegistryEntry11getPropertyEPKc which at the moment, would conflict with WhateverGreen's implementation. I would prefer to not ship a custom WEG that has this line updated to allow multiple plug-ins to wrap/reroute this function. The usage in question is in an IORegistry cleansing module, that reports back to specific Procs with specific details about the system such as manufacturer with custom string Apple Inc. and so on.

This fixes the following kernel panic when a separate plug-in wishes to reroute the same function:

panic(cpu 1 caller 0xffffff8013931fbe): Lilu   patcher: @ previous plugin had short jump type on a multiroute function, this is not allowed

Panicked task 0xffffffa51f1b59b0: 120 threads: pid 0: kernel_task
Backtrace (CPU 1), panicked thread: 0xffffffa51eabeb40, Frame : Return Address
0xfffffffefb96f4c0 : 0xffffff800fde8351 mach_kernel : _handle_debugger_trap + 0x4c1
0xfffffffefb96f510 : 0xffffff800ff5611c mach_kernel : _kdp_i386_trap + 0x11c
0xfffffffefb96f550 : 0xffffff800ff459e3 mach_kernel : _kernel_trap + 0x763
0xfffffffefb96f620 : 0xffffff800fd7d971 mach_kernel : _return_from_trap + 0xc1
0xfffffffefb96f640 : 0xffffff800fde8647 mach_kernel : _DebuggerTrapWithState + 0x67
0xfffffffefb96f740 : 0xffffff800fde7ce2 mach_kernel : _panic_trap_to_debugger + 0x1e2
...

I've ensured that my own plug-in does not interfere with WEG, and vice-versa. I would prefer to not ship a custom WEG, if possible.

@royalgraphx royalgraphx changed the title Update routeMultiple -> routeMultipleLong for getProperty Update routeMultiple -> routeMultipleLong for getProperty, wait for IOGraphicsFamily to load before patching AMDSupport on Tahoe Sep 15, 2025
@royalgraphx royalgraphx changed the title Update routeMultiple -> routeMultipleLong for getProperty, wait for IOGraphicsFamily to load before patching AMDSupport on Tahoe Update routeMultiple -> routeMultipleLong for getProperty Sep 16, 2025
@vit9696

vit9696 commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

From what I remember, these functions cannot be routed with long patches on older macOS versions due to an incompatible prefix. Did you thoroughly test your changes with older XNU kernels?

@royalgraphx

Copy link
Copy Markdown
Contributor Author

I did not, but I can spin up every OS X / macOS version later during the week and report back how things went. My bad, forgot to respond until someone recently asked about this.

@vit9696

vit9696 commented Feb 8, 2026

Copy link
Copy Markdown
Collaborator

Thx, that will help. I am fine to merge this if it is safe or merge the route guarded by OS version check.

@vit9696 vit9696 merged commit ed5e710 into acidanthera:master May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants