aboutsummaryrefslogtreecommitdiff
path: root/lib (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2015-01-29get rid of the unnecessary CoreFoundation dependencycomex2-45/+56
2015-01-29port some old codecomex3-1/+301
2015-01-28***yawn***comex2-10/+13
2015-01-28sortacomex2-8/+27
2015-01-28some more stuff compilescomex7-36/+202
2015-01-25right, fix cleanup. (compared to the old system, this avoids busywaiting, ↵comex2-6/+49
and properly frees the thread resources)
2015-01-25this is dumbcomex5-103/+272
2015-01-25fix strerrorcomex3-2/+8
2015-01-25fix substrate-compat; check in testcomex1-3/+8
2015-01-25fixescomex6-21/+39
2015-01-24fixescomex1-4/+7
2015-01-24it compiles...comex9-101/+138
2015-01-24...comex14-157/+474
2015-01-24Add function to deal with mprotecting RW and back. A bit more complex than ↵comex8-65/+130
the minimum would be... (and minor build fixes)
2015-01-21stopping other threads.comex6-23/+234
2015-01-21add substitute_strerrorcomex3-6/+35
2015-01-21minor cleanup - stop caring about thumb outside of arch-specific codecomex7-18/+21
(and fix makefile bug where files whose names contained 'arm' would always be ldid'd)