aboutsummaryrefslogtreecommitdiff
path: root/lib (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-03-01A number of critical fixes painstakingly discovered in the slowest way possible.comex12-23/+39
2015-03-01fix stack alignmentcomex1-3/+6
2015-03-01Let's get hacky!comex1-3/+16
2015-03-01make jump-dis use a vec as a stack, rather than a hacky queuecomex2-26/+18
2015-03-01add veccomex4-9/+156
2015-02-28Add extra argument to substitute_hook_functions and interpose_imports for ↵comex4-12/+68
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.
2015-02-28fix accidental usage of panic() from mach/mach.h instead of substitute_paniccomex2-7/+9
2015-02-28Add substituted and fix things up to use it. Still untested.comex1-0/+5
2015-02-28Rename ios-bootstrap to darwin-bootstrap; cleanup posixspawn-hook and ↵comex1-145/+0
unrestrict. Not tested yet.
2015-02-24fix (and make more robust) strerror.ccomex3-14/+20
2015-02-24Add unaligned read/write functions.comex7-8/+34
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.
2015-02-24fix armv7 syscall registers :ocomex1-1/+6
2015-02-24fix "panic" in substrate-compat.ccomex1-4/+4
2015-02-24fix arm64/armv7 ishcomex5-6/+13
2015-02-23Add transform-dis-cases-arm64.S and fix a serious bug thus discovered.comex1-3/+3
Commit transform-dis-cases-x86_64.S, which I forgot to earlier.
2015-02-23Ban calls within transform regions in threadsafe mode.comex14-37/+104
2015-02-23fix some i386 stuffcomex3-43/+56
2015-02-23fix i386 manual syscall, mmap return checkcomex2-5/+9
2015-02-23Fix vm_remap, of trouble with which the previous diagnosis was completely ↵comex1-10/+12
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.
2015-02-23remove old commentcomex1-5/+0
2015-02-23and avoid call to pthreadscomex1-1/+5
2015-02-23Redo manual syscalls, and use them for hooking.. And fix mmap, which now ↵comex4-84/+114
makes the whole thing slightly broken, because vm_remap into the middle of the shared region apparently silently does nothing.
2015-02-18various fixescomex6-55/+61
2015-02-18er, don't unnecessarily spam thread start/resume.comex1-27/+34
2015-02-18Fix hook-function:comex9-311/+466
- 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.
2015-02-15more fixescomex3-20/+48
2015-02-14fix test casescomex2-2/+2
2015-02-14Trampoline fixes.comex10-48/+86
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).
2015-02-09theoretically support x86 PICcomex1-14/+46
2015-02-09call vs. branch fixes on ARM (though really I should just ignore calls)comex2-4/+2
2015-02-09add transform-dis-{i386,x86_64} to makefile - fix a missing UNUSEDcomex1-0/+1
2015-02-09Fix a broken bit test.comex1-1/+3
2015-02-09morecomex5-40/+51
2015-02-08Fix other architectures compiling - haven't tried *running* anything..comex6-74/+85
2015-02-08Refactor disassembly so x86 works, and add x86 transform-dis.comex20-197/+298
This patch is a monolithic mess, because I was too lazy to do the refactor first (that would require some stash fun, since I wasn't actually sure before doing x86 transform-dis what would be needed). Anyway, the resulting code should be cleaner - less duplication. This breaks ARM/ARM64.
2015-02-08formattingcomex1-11/+17
2015-02-08starting x86 supportcomex10-129/+341
2015-02-05right, going to bedcomex2-18/+78
2015-02-05starting dis-tables.hcomex1-0/+79
2015-02-03Make the ARM branches actually go to the right place. I need automated ↵comex2-3/+4
tests before stable.
2015-02-03fix ARM64 too, theoreticallycomex8-36/+107
2015-02-01whoops, don't mean to always jump to thumb modecomex1-1/+1
2015-02-01formattingcomex2-11/+19
2015-02-01fix my utter failure to handle branches/conditionals correctly (on ARM)comex15-82/+276
2015-01-30remove GNU-isms from cbitcomex1-11/+30
2015-01-30add README (and note to self to fix something)comex1-0/+2
2015-01-29...comex2-49/+3
2015-01-29a bunch of stuff that should have been committed separatelycomex2-13/+22
2015-01-29add SUBSTITUTE_DONT_STOP_THREADS for substrate compat - substrate doesn't do ↵comex1-1/+1
this, and they might not be on the main thread. though that would be gross.
2015-01-29misc. fixescomex1-1/+0