Skip to content

Commit 05c4a18

Browse files
committed
See if I can just get the info from taint_api
1 parent 291805e commit 05c4a18

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

panda/plugins/pri_taint/pri_taint.cpp

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extern "C" {
3333
#include "callstack_instr/callstack_instr_ext.h"
3434

3535
// taint
36+
#include "taint_api.h"
3637
#include "taint2/taint2_ext.h"
3738

3839
bool init_plugin(void *);
@@ -66,24 +67,6 @@ Panda__SrcInfoPri *pandalog_src_info_pri_create(const char *src_filename, uint64
6667
si->insertionpoint = 1;
6768
return si;
6869
}
69-
// should just be able to include these from taint2.h or taint_processor.cpp
70-
Addr make_maddr(uint64_t a) {
71-
Addr ma;
72-
ma.typ = MADDR;
73-
ma.val.ma = a;
74-
ma.off = 0;
75-
ma.flag = (AddrFlag) 0;
76-
return ma;
77-
}
78-
Addr make_greg(uint64_t r, uint16_t off) {
79-
Addr ra = {
80-
.typ = GREG,
81-
.val = { .gr = r },
82-
.off = off,
83-
.flag = (AddrFlag) 0
84-
};
85-
return ra;
86-
}
8770

8871
void print_membytes(CPUState *env, target_ulong a, target_ulong len) {
8972
unsigned char c = (unsigned char) 0;
@@ -145,7 +128,8 @@ void lava_taint_query(target_ulong buf, LocType loc_t, target_ulong buf_len, con
145128
}
146129

147130
if (debug) {
148-
printf("Querying \"%s\": " TARGET_FMT_lu " bytes @ 0x%lx phys 0x%lx, strnlen=%d", astnodename, buf_len, (unsigned long)buf, (unsigned long)phys, is_strnlen);
131+
printf("Querying \"%s\": " TARGET_FMT_lu " bytes @ 0x%lx phys 0x%lx, strnlen=%d",
132+
astnodename, buf_len, (unsigned long)buf, (unsigned long)phys, is_strnlen);
149133
print_membytes(cpu, buf, is_strnlen? 32 : buf_len);
150134
printf("\n");
151135
}

0 commit comments

Comments
 (0)