[panda-users] panda_current_asid(env) vs. get_current_process(env)->asid
Bridgey theGeek
bridgeythegeek at gmail.com
Tue Aug 8 19:00:55 EDT 2017
Hi PANDAs,
In `asidstory` the 'Asid' column is populated by the value from:
get_current_process(env)->asid
I notice there's another function which returns an Asid called:
panda_current_asid(env)
However, they don't seem to return the same value.
I can see in `common.c` that `panda_current_asid(env)` returns the
value of cr[3] (at least for x86).
However, get_current_process(env) seems to be doing something with
OSI. osi_linux.cpp, for example:
void on_get_current_process(CPUState *env, OsiProc **out_p) {
OsiProc *p = NULL;
PTR ts;
// target_long asid = panda_current_asid(env);
ts = get_task_struct(env, (_ESP & THREADINFO_MASK));
if (ts) {
// valid task struct
// got a reasonable looking process.
// return it and save in cache
p = (OsiProc *)g_malloc0(sizeof(OsiProc));
fill_osiproc(env, p, ts);
}
*out_p = p;
}
So two questions:
1) What's the difference between the two Asids?
2) As long as I'm consistent, does it matter which I use? (In my case,
I'm analysis memory read/writes when the Asid is a specific value.)
Thank you,
Adam
More information about the panda-users
mailing list