| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
it was added in the otherwise cosmetic
dfd16cc1f759a103707ebd27743abc621486e131 because I didn't change the
generated code at all - just switched to the standard aliases of the
functions I was already using. But I forgot that <stdatomic.h> isn't
present in relatively recent Xcode, so I'm switching back for now.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I will probably need to add an option to deal with GCC 5.2's new
optimization - to not save caller-saved registers if the called function
is known not to use them, which would break with hooked functions.
Don't want to emit the required stub by default because it will likely
be slow. I need to verify that Clang doesn't currently have such an
optimization...
(ABI break - need to avoid this once it gets widely distributed Soon,
obviously)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
hood hashing - it isn't that much code and supposedly performs much better when the table gets full. *however*, it requires checking the hash of every entry in the chain during insert, which basically means storing it, which means more memory usage ... but by allowing fuller tables it could decrease memory usage. but if you have a big table anyway to avoid copying, you don't want *extra*... and storing the hash twice in the simple case is so dumb feeling. dunno.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
use with unhooking.
I think we'll need to explicitly record trampoline locations to avoid
the possibility of stomping on someone else's stuff if the function was
re-patched...
Also, document substitute_hook_functions.
|
| |
|
| |
|
|
|
|
|
|
| |
unrestrict.
Not tested yet.
|
| |
|
|
|
|
|
|
|
| |
I thought I could get away without since I wasn't (presently) targeting
systems without hardware support for unaligned accesses, but on armv7
clang insists on optimizing into the one ARM instruction that requires
alignment anyway - LDM/STM. Oops. Damnit, clang.
|
| |
|
| |
|
| |
|
|
|
|
| |
Commit transform-dis-cases-x86_64.S, which I forgot to earlier.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
incorrect.
It's actually the fact that no vm_map_server actually exists on the
kernel side - even though the otherwise useless function vm_remap exists
in the kernel source, and mig generates server code for it, apparently
that server code isn't built or linked into the kobject table. Bizarre.
Anyway, switch to mach_vm_remap, which is what vm_remap in userspace
calls into.
|
| |
|
| |
|
|
|
|
| |
makes the whole thing slightly broken, because vm_remap into the middle of the shared region apparently silently does nothing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Thread stoppage is now complemented by sigaction to catch injected
threads (sigaction is not used exclusively because the rest of the
program could be trying to use sigaction itself in the meantime - this
is a real thing, ask Dolphin)
- mprotect is no longer used due to max_protection possibly getting in
the way; instead, a copy is created and mapped onto the original.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The transformed code was incorrect because it assumed the pointer it was
writing to was where the code would execute, but it was actually
'rewritten_temp'. Changed transform_dis_main to take a pc_trampoline
pointer, which also helps the test harness. However, this means that it
has to be called after the trampoline has been allocated, while before
the trampoline allocation depended on the generated size; this change
doesn't bother to use two passes or anything, but just allocates a new
code buffer if the maximum possible size isn't available - not the end
of the world, since trampoline_ptr will still only be increased by the
actual size before the next hook in the series (if any).
|
| |
|