Markakd / GREBE

75 stars 14 forks source link

Which compiler to build the kernel with? GCC, Clang, or both? #1

Closed Luluno01 closed 2 years ago

Luluno01 commented 2 years ago

Greetings! I am trying to run GREBE following the documentations in this repository but I found the instructions of building the kernel seemed to conflict with each other.

In the main README:

Build kernel with our gcc

In the analyzer README:

build kernel as usual but make sure you are building with our custimized clang

So which one should I use? Or should I build the kernel twice using both GCC and Clang? It sounds like I should build with GCC for an actual runnable kernel, and build another one (unlikely to be runnable) with Clang from scratch for analysis only. Is it correct?

Markakd commented 2 years ago

Hi,

You're right.

The kernel used in analyzer is to generate LLVM bitcode to analyze the bug. Once you get the LLVM bitcode, you would be able to run the analyzer and find useful objects for the bug.

In the main README, we used the customized GCC to build a runnable kernel for fuzzing. This step requires the objects found by the analyzer.

Luluno01 commented 2 years ago

Okay. Thanks!