<div dir="ltr">Ah, yes. This sounds right.<div><br></div><div>I had also observed the delayed update of kernel data structures. This happens when a new process starts. Most of the OsiProc fields were correct at the callback time, but the process name was still that of the parent process.</div><div><br></div><div>For my plugin, I opted to mark the new process as &quot;fresh&quot; and update the name next time I see the process.</div><div><br></div><div>Thanks!</div><div><br></div><div>M.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-17 19:34 GMT+02:00 Brendan Dolan-Gavitt <span dir="ltr">&lt;<a href="mailto:brendandg@nyu.edu" target="_blank">brendandg@nyu.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I *think* the reasoning was that right when PGD_CHANGED happens the<br>
data structures that track the current process may be in transition,<br>
and so it might not be reliable to get the current process. But I<br>
don&#39;t know if this was actually tested. According to git-blame, Tim is<br>
the one to ask, so hopefully he&#39;ll weigh in.<br>
<br>
It should also be easy enough to test this hypothesis by switching it<br>
to PGD_CHANGED on a few test cases an seeing if the results match up.<br>
If we can get away with only invoking on PGD change that would<br>
definitely be an improvement.<br>
<br>
-Brendan<br>
<div><div class="h5"><br>
On Sun, Jul 17, 2016 at 1:20 PM, Manolis Stamatogiannakis<br>
&lt;<a href="mailto:mstamat@gmail.com">mstamat@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I was going through the file_taint plugin code and was wondering about the<br>
&gt; osi_foo() callback.<br>
&gt; <a href="https://github.com/moyix/panda/blob/master/qemu/panda_plugins/file_taint/file_taint.cpp#L386" rel="noreferrer" target="_blank">https://github.com/moyix/panda/blob/master/qemu/panda_plugins/file_taint/file_taint.cpp#L386</a><br>
&gt;<br>
&gt; Is there any reason that the function is hooked as a<br>
&gt; PANDA_CB_BEFORE_BLOCK_EXEC callback rather than PANDA_CB_VMI_PGD_CHANGED<br>
&gt; callback?<br>
&gt;<br>
&gt; For linux it seems to me that PANDA_CB_VMI_PGD_CHANGED would yield<br>
&gt; equivalent results at only a tiny fraction of the invocations.<br>
&gt;<br>
&gt; Same should be true for windows as far as I can tell.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; M.<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; panda-users mailing list<br>
&gt; <a href="mailto:panda-users@mit.edu">panda-users@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/panda-users" rel="noreferrer" target="_blank">http://mailman.mit.edu/mailman/listinfo/panda-users</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Brendan Dolan-Gavitt<br>
Assistant Professor, Department of Computer Science and Engineering<br>
NYU Tandon School of Engineering<br>
</font></span></blockquote></div><br></div>