mchalupa / dg

[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
MIT License
474 stars 131 forks source link

[Question] Is it possible to use dg to slice and analyze Linux source code? #448

Closed Hanseltu closed 1 year ago

Hanseltu commented 1 year ago

Dear developers,

I am new to dg and just want to confirm with you that is it possible to use dg to analyze the whole Linux source code. Or is it possible to extend the current version of dg to support large-scale program analysis? How can I do it if the answer is affirmative?

Thank you very much and looking forward to your reply!

Best regards, Haoxin

mchalupa commented 1 year ago

Hi,

I'm pretty sure that dg won't be able to analyse the whole Linux source code. The reasons are exactly analyses that do not scale: mainly points-to analysis, which is really inefficient (but quite precise), but also data dependence analysis, which should be efficient, but eats a lot of memory. Control dependence could make it, perhaps.

Replacing the analyses should be quite straightforward if the new analysis implements the right interface.

mchalupa commented 1 year ago

btw. another prerequisite would be compiling the whole kernel into LLVM. I know people have tried, but I do not know if they succeeded and how hard it is.

Hanseltu commented 1 year ago

Hi @mchalupa, thanks for your suggestions! I think I know what I should do next. Close this issue for now. Thanks!