AngoraFuzzer / libdft64

libdft for Intel Pin 3.x and 64 bit platform. (Dynamic taint tracking, taint analysis)
Other
236 stars 47 forks source link

Errors building libdft-dta #8

Open huang-zhen opened 4 years ago

huang-zhen commented 4 years ago

Hi,

I encountered several compilation errors when building libdft-dta, while track, nullpin, libdft were built without any errors. I used pin-3.7-97619-g0d0c92f4f-gcc-linux, which was downloaded using the install_pin.sh script, on Ubuntu 16.04. Below are the error messages. Can you please take a look? Thank you.

libdft-dta.cpp: In function ‘void alert(ADDRINT, ADDRINT)’: libdft-dta.cpp:116:25: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘ADDRINT {aka long unsigned int}’ [-Werror=format=] getpid(), ins, bt); ^ libdft-dta.cpp:116:25: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘ADDRINT {aka long unsigned int}’ [-Werror=format=] libdft-dta.cpp: In function ‘ADDRINT assert_reg32(thread_ctx_t, uint32_t, uint32_t)’: libdft-dta.cpp:151:53: error: ‘tagmap_getl’ was not declared in this scope return thread_ctx->vcpu.gpr[reg] | tagmap_getl(addr); ^ libdft-dta.cpp: In function ‘ADDRINT assert_reg16(thread_ctx_t, uint32_t, uint32_t)’: libdft-dta.cpp:171:38: error: ‘VCPU_MASK16’ was not declared in this scope return (thread_ctx->vcpu.gpr[reg] & VCPU_MASK16) ^ libdft-dta.cpp:172:21: error: ‘tagmap_getw’ was not declared in this scope | tagmap_getw(addr); ^ libdft-dta.cpp: In function ‘ADDRINT assert_mem32(ADDRINT, ADDRINT)’: libdft-dta.cpp:188:26: error: ‘tagmap_getl’ was not declared in this scope return tagmap_getl(paddr) | tagmap_getl(taddr); ^ libdft-dta.cpp: In function ‘ADDRINT assert_mem16(ADDRINT, ADDRINT)’: libdft-dta.cpp:204:26: error: ‘tagmap_getw’ was not declared in this scope return tagmap_getw(paddr) | tagmap_getw(taddr); ^ libdft-dta.cpp: In function ‘void dta_instrument_jmp_call(LEVEL_CORE::INS)’: libdft-dta.cpp:245:33: error: ‘REG32_INDX’ was not declared in this scope IARG_UINT32, REG32_INDX(reg), ^ libdft-dta.cpp:259:33: error: ‘REG16_INDX’ was not declared in this scope IARG_UINT32, REG16_INDX(reg), ^ libdft-dta.cpp: In function ‘void post_read_hook(syscall_ctx_t)’: libdft-dta.cpp:373:62: error: ‘tagmap_setn’ was not declared in this scope tagmap_setn(ctx->arg[SYSCALL_ARG1], (size_t)ctx->ret); ^ libdft-dta.cpp: In function ‘void post_readv_hook(syscall_ctx_t)’: libdft-dta.cpp:415:60: error: ‘tagmap_setn’ was not declared in this scope tagmap_setn((size_t)iov->iov_base, iov_tot); ^ libdft-dta.cpp: In function ‘void post_socketcall_hook(syscall_ctx_t*)’: libdft-dta.cpp:474:8: error: ‘SYS_ACCEPT’ was not declared in this scope case SYS_ACCEPT: ^ libdft-dta.cpp:475:8: error: ‘SYS_ACCEPT4’ was not declared in this scope case SYS_ACCEPT4: ^ libdft-dta.cpp:488:8: error: ‘SYS_GETSOCKNAME’ was not declared in this scope case SYS_GETSOCKNAME: ^ libdft-dta.cpp:489:8: error: ‘SYS_GETPEERNAME’ was not declared in this scope case SYS_GETPEERNAME: ^ libdft-dta.cpp:504:8: error: ‘SYS_SOCKETPAIR’ was not declared in this scope case SYS_SOCKETPAIR: ^ libdft-dta.cpp:512:8: error: ‘SYS_RECV’ was not declared in this scope case SYS_RECV: ^ libdft-dta.cpp:521:24: error: ‘tagmap_setn’ was not declared in this scope (size_t)ctx->ret); ^ libdft-dta.cpp:527:8: error: ‘SYS_RECVFROM’ was not declared in this scope case SYS_RECVFROM: ^ libdft-dta.cpp:536:23: error: ‘tagmap_setn’ was not declared in this scope (size_t)ctx->ret); ^ libdft-dta.cpp:552:8: error: ‘SYS_GETSOCKOPT’ was not declared in this scope case SYS_GETSOCKOPT: ^ libdft-dta.cpp:564:8: error: ‘SYS_RECVMSG’ was not declared in this scope case SYS_RECVMSG: ^ libdft-dta.cpp:592:26: error: ‘tagmap_setn’ was not declared in this scope msg->msg_controllen); ^ libdft-dta.cpp:623:16: error: ‘tagmap_setn’ was not declared in this scope iov_tot); ^ libdft-dta.cpp: In function ‘int main(int, char*)’: libdft-dta.cpp:773:65: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] (void)syscall_set_post(&syscall_desc[__NR_read], post_read_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:776:67: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] (void)syscall_set_post(&syscall_desc[__NR_readv], post_readv_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:780:40: error: ‘NR_socketcall’ was not declared in this scope (void)syscall_set_post(&syscall_desc[NR_socketcall], ^ libdft-dta.cpp:784:63: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] (void)syscall_set_post(&syscall_desc[__NR_dup], post_dup_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:785:64: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] (void)syscall_set_post(&syscall_desc[__NR_dup2], post_dup_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:788:67: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] (void)syscall_set_post(&syscall_desc[__NR_close], post_close_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:793:19: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] post_open_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t )); ^ libdft-dta.cpp:795:19: error: invalid conversion from ‘void ()(syscall_ctx_t)’ to ‘void ()(LEVEL_VM::THREADID, syscall_ctx_t) {aka void ()(unsigned int, syscall_ctx_t)}’ [-fpermissive] post_open_hook); ^ In file included from libdft-dta.cpp:51:0: /home/user/code/libdft64/src/syscall_desc.h:21:5: note: initializing argument 2 of ‘int syscall_set_post(syscall_desc_t, void ()(LEVEL_VM::THREADID, syscall_ctx_t))’ int syscall_set_post(syscall_desc_t , void ()(THREADID, syscall_ctx_t *)); ^ cc1plus: all warnings being treated as errors

YuanchengJiang commented 3 years ago

Hi, I also met this problem.

WhaleLearn commented 3 years ago

你好,我也遇到了这个问题。

Hello, I have encountered the problem of missing #include header files in make tools (libdft-dta, track, nullpin, libdft). Did you encounter this problem when you successfully compiled track, nullpin, and libdft? Thank you for you time.

PBearson commented 3 years ago

I also have this issue. libdft-dta does not build on my machine (Ubuntu 20.04) or in the specified Docker image. All other tools compile just fine.

spinpx commented 3 years ago

sorry, I have pin to 3.20 and test and can't reproduce your issue..

M4tsuri commented 3 years ago

same error, with pin 3.20

spinpx commented 3 years ago

same error, with pin 3.20

Would you provide your environment in detailed?

M4tsuri commented 3 years ago

same error, with pin 3.20

Would you provide your environment in detailed?

Well, it seem's that the support for libdft-dta has not yet been added. I tried to search for some functions appearing in the error message and got this:

Screen Shot 2021-11-09 at 17 14 12

As you can see, there is no such a function. But this function does exist in the original implementation. While libdft64 is using an optimized tagmap representation, maybe the related code should be rewrote. Thank you.

spinpx commented 3 years ago

@M4tsuri Sorry that I have not noticed libdft-dta since I have commented it in the makefile, and do not use in my project. For the usage, please see track.cpp.

same error, with pin 3.20

Would you provide your environment in detailed?

Well, it seem's that the support for libdft-dta has not yet been added. I tried to search for some functions appearing in the error message and got this:

Screen Shot 2021-11-09 at 17 14 12

As you can see, there is no such a function. But this function does exist in the original implementation. While libdft64 is using an optimized tagmap representation, maybe the related code should be rewrote. Thank you.

M4tsuri commented 3 years ago

@spinpx Ok, I'll try to work on it. Thank you.

M4tsuri commented 3 years ago

@spinpx By the way, I've tried the example program track. However, I found this example is rather confusing. The function below can only deal with 8-byte data.

https://github.com/AngoraFuzzer/libdft64/blob/e20f60298938b092b51f0f78d4f0d7786c3a8f34/tools/track.cpp#L8-L13

But it's improperly applied on a uint16 value, which leads to unexpected behavior.

https://github.com/AngoraFuzzer/libdft64/blob/e20f60298938b092b51f0f78d4f0d7786c3a8f34/tools/mini_test.cpp#L52-L53

> $ pin -t obj-intel64/track.so -- obj-intel64/mini_test.exe  cur_input                                     [±dev ✓]
[PIN][SET] addr: 0x7ffe8f165ff8, lb: 17, taint: 8
set: 0x7ffe8f165ff8, 8
[PIN][GET] addr: 0x7ffe8f165ff8, v: 0, lb: 17, taint: {(8, 9) }
get: 0x7ffe8f165ff8
[PIN][GETVAL] v: 0, lb: 17, taint: {(8, 9) }
getval: 0
[PIN][GET] addr: 0x7ffe8f165ff6, v: 0, lb: 17, taint: {(8, 9) }
** MEMORY OVERLAPPING. THERE SHOULD NOT BE A TAINT HERE **
...

If this is intended, I think it would be better to comment it out, or use a uint64_t instead. I can make a PR if needed. Thank you.

spinpx commented 2 years ago

@M4tsuri You are right, TestGetHandler will read 8 bytes length as its taint. track.cpp is just a demo in my implementation, so I am sorry that I haven't check it in detail. You can also read code at https://github.com/AngoraFuzzer/Angora/tree/master/pin_mode as example.

Finally , feel free to contribute your code. 👍

xubenji commented 2 years ago

Hello everyone, I am a beginner at libdft. I am very interested in binary analysis, and I currently studying in this field. I want to know how libdft cooperates with the Intel pin(because libdft used the pin to implement some functions). English is not my mother language, and I am a little bit anxious, if you can figure out what I say when I said too much, so I briefly introduce my questions upfront. Q1, is the libdft like the simple example .c files in pin/source/tools/ManualExamples in intel pin? Because I found out that the when we build libdft, it ends up would generate the "track.so" in libdft64/tools/obj-intel64/ which we can directly use it in pin/source/tools/ManualExamples/obj-intel64/, like other shared object files, inscount0.so, itrace.so, etc. Q2, How libdft cooperates with the pin? I expanded the Makefile in the libdft. I found that .cpp files in src directory haven't been linked into the track.so. What those .cpp files for?(The entire makefile output has been written below). Q3, If the Q1 is correct, how can I figure out the libdft's structure?It is a little bit complicated for me since this project includes two tools(libdft, pin). I guess that If I figure out how to build my own tools like inscount0.cpp, itrace.cpp is a breakthrough to understanding libdft's structure. if so, could you help me to find some tutorials to learn how to build my own tools with pin?(I found that the intel pin has the official doc, but it introduces the pin very briefly. I really want a more detailed tutorial). Thank you very much!

# #

The makefile output:

`root@localhost:~/libdft64# export PIN_ROOT=$(pwd)/pin/pin-3.20-98437-gf02b61307-gcc-linux root@localhost:~/libdft64# make cd src && CPPFLAGS= DFTFLAGS= make make[1]: Entering directory '/root/libdft64/src' mkdir -p obj-intel64/ make objects make[2]: Entering directory '/root/libdft64/src' g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/libdft_api.o libdft_api.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/libdft_core.o libdft_core.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/syscall_hook.o syscall_hook.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/syscall_desc.o syscall_desc.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/tagmap.o tagmap.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/bdd_tag.o bdd_tag.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/tag_trait.o tag_trait.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_binary_op.o ins_binary_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_unitary_op.o ins_unitary_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_ternary_op.o ins_ternary_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_clear_op.o ins_clear_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_xfer_op.o ins_xfer_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_movsx_op.o ins_movsx_op.cpp g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -c -o obj-intel64/ins_xchg_op.o ins_xchg_op.cpp make[2]: Leaving directory '/root/libdft64/src' make libs make[2]: Entering directory '/root/libdft64/src' ar rcsv obj-intel64/libdft.a obj-intel64/libdft_api.o obj-intel64/libdft_core.o obj-intel64/syscall_hook.o obj-intel64/syscall_desc.o obj-intel64/tagmap.o obj-intel64/bdd_tag.o obj-intel64/tag_trait.o obj-intel64/ins_binary_op.o obj-intel64/ins_unitary_op.o obj-intel64/ins_ternary_op.o obj-intel64/ins_clear_op.o obj-intel64/ins_xfer_op.o obj-intel64/ins_movsx_op.o obj-intel64/ins_xchg_op.o a - obj-intel64/libdft_api.o a - obj-intel64/libdft_core.o a - obj-intel64/syscall_hook.o a - obj-intel64/syscall_desc.o a - obj-intel64/tagmap.o a - obj-intel64/bdd_tag.o a - obj-intel64/tag_trait.o a - obj-intel64/ins_binary_op.o a - obj-intel64/ins_unitary_op.o a - obj-intel64/ins_ternary_op.o a - obj-intel64/ins_clear_op.o a - obj-intel64/ins_xfer_op.o a - obj-intel64/ins_movsx_op.o a - obj-intel64/ins_xchg_op.o make[2]: Leaving directory '/root/libdft64/src' make dlls make[2]: Entering directory '/root/libdft64/src' make[2]: Nothing to be done for 'dlls'. make[2]: Leaving directory '/root/libdft64/src' make apps make[2]: Entering directory '/root/libdft64/src' make[2]: Nothing to be done for 'apps'. make[2]: Leaving directory '/root/libdft64/src' make tools make[2]: Entering directory '/root/libdft64/src' make[2]: Nothing to be done for 'tools'. make[2]: Leaving directory '/root/libdft64/src' make[1]: Leaving directory '/root/libdft64/src'

cd tools && TARGET=intel64 CPPFLAGS= DFTFLAGS= make make[1]: Entering directory '/root/libdft64/tools' mkdir -p obj-intel64/ make objects make[2]: Entering directory '/root/libdft64/tools' make[2]: Nothing to be done for 'objects'. make[2]: Leaving directory '/root/libdft64/tools' make libs make[2]: Entering directory '/root/libdft64/tools' make[2]: Nothing to be done for 'libs'. make[2]: Leaving directory '/root/libdft64/tools' make dlls make[2]: Entering directory '/root/libdft64/tools' make[2]: Nothing to be done for 'dlls'. make[2]: Leaving directory '/root/libdft64/tools' make apps make[2]: Entering directory '/root/libdft64/tools' g++ -DTARGET_IA32E -DHOST_IA32E -DFUND_TC_TARGETCPU=FUND_CPU_INTEL64 -DFUND_TC_HOSTCPU=FUND_CPU_INTEL64 -DTARGET_LINUX -DFUND_TC_TARGETOS=FUND_OS_LINUX -DFUND_TC_HOSTOS=FUND_OS_LINUX -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -O3 -o obj-intel64/mini_test.exe mini_test.cpp -no-pie -Wl,--as-needed -lm -ldl -lpthread make[2]: Leaving directory '/root/libdft64/tools' make tools make[2]: Entering directory '/root/libdft64/tools' g++ -Wall -Werror -Wno-unknown-pragmas -DPIN_CRT=1 -fno-stack-protector -fno-exceptions -funwind-tables -fasynchronous-unwind-tables -fno-rtti -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -fabi-version=2 -faligned-new -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/gen -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/stlport/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/libstdc++/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/arch-x86_64 -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi -isystem /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/crt/include/kernel/uapi/asm-x86 -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/components/include -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/include/xed -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/Utils -I/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/tools/InstLib -O3 -fomit-frame-pointer -fno-strict-aliasing -Wno-deprecated-declarations -DNO_PINTOOL_LOG -I/root/libdft64/src -L/root/libdft64/src/obj-intel64 -c -o obj-intel64/track.o track.cpp g++ -shared -Wl,--hash-style=sysv /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/intel64/runtime/pincrt/crtbeginS.o -Wl,-Bsymbolic -Wl,--version-script=/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/source/include/pin/pintool.ver -fabi-version=2 -o obj-intel64/track.so obj-intel64/track.o -L/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/intel64/runtime/pincrt -L/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/intel64/lib -L/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/intel64/lib-ext -L/root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/extras/xed-intel64/lib -lpin -lxed /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/intel64/runtime/pincrt/crtendS.o -lpin3dwarf -ldl-dynamic -nostdlib -lstlport-dynamic -lm-dynamic -lc-dynamic -lunwind-dynamic -L/root/libdft64/src/obj-intel64 -ldft make[2]: Leaving directory '/root/libdft64/tools' make[1]: Leaving directory '/root/libdft64/tools' root@localhost:~/libdft64# ls Dockerfile LICENSE README.md install_pin.ps1 pin tools INSTALL.md Makefile env.init install_pin.sh src root@localhost:~/libdft64# cd tools root@localhost:~/libdft64/tools# ls Makefile libdft-dta.cpp makefile.rules nullpin.cpp track.cpp cur_input libdft.cpp mini_test.cpp obj-intel64 root@localhost:~/libdft64/tools# make test_mini /root/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/pin -t obj-intel64//track.so -- obj-intel64/mini_test.exe cur_input [PIN][SET] addr: 0x7ffd999cf638, lb: 17, taint: 8 set: 0x7ffd999cf638, 8 [PIN][GET] addr: 0x7ffd999cf638, v: 0, lb: 17, taint: {(8, 9) } get: 0x7ffd999cf638 [PIN][GETVAL] v: 0, lb: 17, taint: {(8, 9) } getval: 0 [PIN][GET] addr: 0x7ffd999cf636, v: 0, lb: 17, taint: {(8, 9) } get: 0x7ffd999cf636 [PIN][GET] addr: 0x7ffd999cf636, v: 30496, lb: 112, taint: {(5, 6) (6, 7) (8, 9) } get: 0x7ffd999cf636 [PIN][GETVAL] v: 30496, lb: 110, taint: {(5, 6) (6, 7) } getval: 30496 [PIN][GETVAL] v: 30498, lb: 110, taint: {(5, 6) (6, 7) } getval: 30498`

spinpx commented 2 years ago

Q1, is the libdft like the simple example .c files in pin/source/tools/ManualExamples in intel pin? Because I found out that the when we build libdft, it ends up would generate the "track.so" in libdft64/tools/obj-intel64/ which we can directly use it in pin/source/tools/ManualExamples/obj-intel64/, like other shared object files, inscount0.so, itrace.so, etc.

Yes , they are the same, you can use pin -t obj-intel64/track.so -- target to run them.

Q2, How libdft cooperates with the pin? I expanded the Makefile in the libdft. I found that .cpp files in src directory haven't been linked into the track.so. What those .cpp files for?(The entire makefile output has been written below).

Please check them in makefile.default.rules.

Q3, If the Q1 is correct, how can I figure out the libdft's structure?It is a little bit complicated for me since this project includes two tools(libdft, pin). I guess that If I figure out how to build my own tools like inscount0.cpp, itrace.cpp is a breakthrough to understanding libdft's structure. if so, could you help me to find some tutorials to learn how to build my own tools with pin?(I found that the intel pin has the official doc, but it introduces the pin very briefly. I really want a more detailed tutorial) The src provides a common library for the plugin in tools.

  • src implement the rules of taint tracking.
  • tool defines how to uses the rules in your specific scene, e.g which is the source, sink?
xubenji commented 2 years ago

@spinpx hello,spinpx. I end up finding out this command when I run makefile in libdft64. ar rcsv obj-intel64/libdft.a obj-intel64/libdft_api.o obj-intel64/libdft_core.o obj-intel64/syscall_hook.o obj-intel64/syscall_desc.o obj-intel64/tagmap.o obj-intel64/bdd_tag.o obj-intel64/tag_trait.o obj-intel64/ins_binary_op.o obj-intel64/ins_unitary_op.o obj-intel64/ins_ternary_op.o obj-intel64/ins_clear_op.o obj-intel64/ins_xfer_op.o obj-intel64/ins_movsx_op.o obj-intel64/ins_xchg_op.o

The .cpp files in libdft64/src/ ends up link into libdft.a. I want to find out what is file for?

xubenji commented 2 years ago

By the way, I found that the llibdft.a is the relocate file. it just combines the .o files in src, and does nothing! Why is that?

spinpx commented 2 years ago

The archive is used for static linking with the code in tools.

xubenji commented 2 years ago

But I can't see the libdft.a link with any other .o files

xubenji commented 2 years ago

Hello, everyone. Does someone knows this error when you run the libdft-dta? root@localhost:/home/benjixu/libdft64/tools# /home/benjixu/libdft64/pin/pin-3.20-98437-gf02b61307-gcc-linux/pin -follow_execv -t /home/benjixu/libdft64/tools/obj-intel64/libdft-dta.so -- /home/benjixu/a.out E: Unable to load /home/benjixu/libdft64/tools/obj-intel64/libdft-dta.so: dlopen failed: cannot locate symbol "thread_ctx_ptr" referenced by "/home/benjixu/libdft64/tools/obj-intel64/libdft-dta.so"... I found that the thread_ctx_ptr is the variable in libdft-dta.cpp.

Lambangaw commented 2 years ago

Hi I also get the same issue with @xubenji

dlopen failed: cannot locate symbol "thread_ctx_ptr" referenced by "/home/user/libdft64/tools/obj-intel64/libdft-dta.so"
xubenji commented 2 years ago

There are a lot of versions of libdft-dta. I may use the very old one that raised this error. It's been a while since I ran this file. a lot of detail that I have forget.