Open derekbruening opened 9 years ago
From bruen...@google.com on April 24, 2012 08:16:37
also:
Summary: simultaneous 32-bit and 64-bit library support for x64 DR controlling WOW64 app
Labels: -Priority-Medium Priority-Low OpSys-x64
From bruen...@google.com on June 21, 2012 12:38:25
I started filing these separately:
From rnk@google.com on July 18, 2012 08:03:03
After Yang got mixed_mode.c working under -x86_to_x64, I suggested he try Cygwin ls.exe next, since Cygwin is likely to exercise more x86 corner cases and ls.exe is a well-behaved command line app.
However, we currently crash using our x64 mixed mode support when Cygwin modifies itself.
syslog bits:
From ya...@google.com on July 23, 2012 15:00:30
Failed to run security-common.selfmod.exe in mixed mode.
In emit_utils.c, IF_X64(unlink_shared_syscall_common(SHARED_GENCODE(true))), pc = code->unlinked_shared_syscall + code->sys_unlink_offs, which is null. Then we try to dereference pc, which causes access violation.
From ya...@google.com on July 23, 2012 15:06:24
call stack for the previous failure:
# Child-SP RetAddr Call Site
00 00000000`228bdf50 00000000`152d06d9 dynamorio!unlink_shared_syscall_common+0x9a [c:\src\dynamorio\trunk\core\x86\emit_utils.c @ 6998]
01 00000000`228bdfb0 00000000`150c5fbf dynamorio!unlink_shared_syscall+0x79 [c:\src\dynamorio\trunk\core\x86\emit_utils.c @ 7016]
02 00000000`228bdff0 00000000`150ca527 dynamorio!flush_fragments_synch_unlink_priv+0x90f [c:\src\dynamorio\trunk\core\fragment.c @ 6427]
03 00000000`228be1a0 00000000`15235a2c dynamorio!flush_fragments_in_region_start+0x287 [c:\src\dynamorio\trunk\core\fragment.c @ 6892]
04 00000000`228be250 00000000`1523500b dynamorio!flush_and_remove_executable_vm_area+0x3c [c:\src\dynamorio\trunk\core\vmareas.c @ 6078]
05 00000000`228be2c0 00000000`1538c212 dynamorio!app_memory_protection_change+0x1ebb [c:\src\dynamorio\trunk\core\vmareas.c @ 6533]
06 00000000`228be570 00000000`15383208 dynamorio!presys_ProtectVirtualMemory+0x4f2 [c:\src\dynamorio\trunk\core\win32\syscall.c @ 1925]
07 00000000`228be6f0 00000000`15158da4 dynamorio!pre_system_call+0x22b8 [c:\src\dynamorio\trunk\core\win32\syscall.c @ 2395]
08 00000000`228beb70 00000000`1514c951 dynamorio!handle_system_call+0x734 [c:\src\dynamorio\trunk\core\dispatch.c @ 1770]
09 00000000`228becf0 00000000`151482f9 dynamorio!dispatch_enter_dynamorio+0x10b1 [c:\src\dynamorio\trunk\core\dispatch.c @ 748]
0a 00000000`228bee70 00000000`2281313a dynamorio!dispatch+0x19 [c:\src\dynamorio\trunk\core\dispatch.c @ 143]
0b 00000000`228befe0 00000000`22843700 0x2281313a
0c 00000000`228befe8 abababab`abababab 0x22843700
0d 00000000`228beff0 00000000`00000001 0xabababab`abababab
0e 00000000`228beff8 00000000`00000000 0x1
We never got as far as running clients: for clients there are issues with static things like DR_REG_X* defines. For that, xref inside DR's IBL generation:
https://github.com/DynamoRIO/dynamorio/blob/master/core/arch/x86/emit_utils.c#L3072
/* Rather than complicating the REG_X* defines used above we have a post-pass
* that shrinks all the registers and all the INTPTR immeds.
* The other two changes we need are performed up above:
* 1) cmp top bits to 0 for match
* 2) no trace_cmp entry points
* Note that we're punting on PR 283152: we go ahead and clobber the top bits
* of all our scratch registers.
*/
PR 283152 == #822
From derek.br...@gmail.com on February 24, 2009 14:14:20
Today 32-bit DR can control the 32-bit parts of a WOW64 app but to see all of the code including the emulation layer we want 64-bit DR able to run the whole mixed-mode app. Some of the capabilities here also apply to Linux mixed-mod apps but those are much, much rarer.
here is my list of cases that will eventually be separately filed here:
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=49