RiS3-Lab / kubo

Use on-demand control- data- flow slicing combined with taint analysis and symbolic execution to produce scalable and precise UB detection for Linux kernel.
22 stars 3 forks source link

"Build llvm bc : python main.py irgen" costs too much hours #3

Open boti-li opened 3 years ago

boti-li commented 3 years ago

In my 4 core , 16GB mem , ubuntu 18.04 PC, the progress of generating llvm ir for kernel lasts so long that it runs for 4 hours but just completes ablout 10%. When looking into the script "app.py", I found there are too many file r&w operations which may account for it. Is my case usual? How can I speed up ? Or can you share the compiled bc code with me, thanks a lot.

Lawliar commented 3 years ago

Hi there, generating llvm ir is one of the most time-consuming process, I'm afraid a 4-core machine is not the best to undertake such a task. Not to mention there is the generation of llvm ir with debug symbols and the subsequent analysis would normally cost memory much more than 16 GB. I would recommend a normal server which has 16 cores and abundant memory, otherwise, the context switch and memory swp might be too heavy(I didn't test on 4-core environment though). I don't think file IO might be a big bottleneck here. Most of the file io are just logging, reading input and writing output which are necessary steps.

The compiled bc files are usually large e.g., several MB to hundreds of MB each. I might need to find a good way to share it if it's doable.