Wanted to Understand the architecture of how things are working in dynamorio Clients

24 views
Skip to first unread message

Atharva Bhanage

unread,
Dec 15, 2023, 4:28:11 AM12/15/23
to DynamoRIO Users
So I was just checking with the client how the function tracking happens, memtrace is there.

I used these 2 clients 1) function tracking (trace malloc function) 2) memtrace_86 

So I was just wondering if I do a malloc in my client for function tracking itself will it detect?  answer -> it doesn't. 
  I just wanted to know why.  I mean, when we are dealing with Symbol of the function and all the system calls are tracked. the things that are indirectly called by the target application also then still, how is the architecture of dynamorio exactly that It is successfully able to isolate the target application and not even see the calls done by itself?

The same things for memtrace_x86 as well like it only gets the read, write calls done by  target application and not the dynamorio. How does this happen?

If The client code is executed within the same process as the target application then how does this happen?

the reason i am asking this is because when I had a pointer lets say

in target_app.cpp
void* m1=(void*) malloc(4);

our tracking client
In wrap_post where I got the address or the pointer m1 I did a malloc_usable_size(m1)
int* malloc_return1=(int *)drwrap_get_retval(wrapcxt);
size_t curr_sz= malloc_usable_size(malloc_return1);

I apparently got the accurate answer for this. So had this doubt about how the isolation exactly happens? like how does dynamorio doesn't see its own calls?


Derek Bruening

unread,
Dec 15, 2023, 9:28:28 AM12/15/23
to Atharva Bhanage, DynamoRIO Users
In general DR and clients have to be kept separate from the application.  DR has a private loader to isolate tool libraries from application libraries.  See https://dynamorio.org/transparency.html#sec_trans_resource and https://dynamorio.org/using.html#sec_extlibs.

**************************************************************************
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
************************************************************************************************

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/86a5f783-a7d3-4a12-8448-076934c0169fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages