[panda-users] taint2 ringbuffer size

Manolis Stamatogiannakis mstamat at gmail.com
Tue May 1 06:39:15 EDT 2018


I was wondering about the size of the ring buffer used by the taint2 plugin.
It is defined
<https://github.com/panda-re/panda/blob/6507f991703b8ac1afdac8b92bff709bded3a0e4/panda/plugins/taint2/taint_ops.h#L35>
as:
#define TAINT2_MEMLOG_SIZE 2

Why is this size chosen?
There's a comment above
<https://github.com/panda-re/panda/blob/6507f991703b8ac1afdac8b92bff709bded3a0e4/panda/plugins/taint2/taint_ops.h#L30>
the definition for the use of ring buffer, but it does't give any clues:
// This will replace the dynamic log, since we now need to track values for
// a much shorter period of time. Instead of full-fledged file logging,
we're
// just going to use a ring buffer.

Intuitively, I'd guess that 2 is the maximum number of memory arguments for
LLVM (?) instructions. Taint is updated per instruction, so a ring buffer
of size 2 is enough for taint2.

Would that be correct?
Or is there another rationale that I'm missing?

Thanks,
Manolis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/panda-users/attachments/20180501/dc95f44a/attachment.html


More information about the panda-users mailing list