ris3-lab / kubo Goto Github PK
View Code? Open in Web Editor NEWUse on-demand control- data- flow slicing combined with taint analysis and symbolic execution to produce scalable and precise UB detection for Linux kernel.
Use on-demand control- data- flow slicing combined with taint analysis and symbolic execution to produce scalable and precise UB detection for Linux kernel.
Since the compilation flags for clang to generate .bc
file are a child set of what is used for gcc to generate .o
file, some .bc
file can fail to be generated. The failed ones can be seen in ./code/log/<linux-version>/irgen.log.
Since not all compilation flags supported by gcc are also supported by clang, it takes some time to locate the flag that can suppress that error, when you experience such an error, feel free to report it here e.g., the failing clang command line, I'll have a look and see how to suppress it.
Nevertheless, if it's just a few .c
source code failed, it won't affect the following procedures very much, since the final merged .bc
file is just a linking of all .bc
files together.
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.
hello
When i use the compile tools of kubo to compile the kernel , I come across some problems.
I find built-in.ll of each module in the corresponding index, but it seems that you do not generate a full module for the whole linux project which like wllvm do , I want to generate a full module ——vmlinux.bc for kernel with built-in of each child module.
But for modules under the drivers/... , kubo may not generate the correct bitcode for them. When i look into these modules ,
i find drivers/staging/.... cause for it. As we all known, immature implenmentation which quality is unknown is stored here, so i just ignore them and link other modules with llvm-link to generate the vmlinux.bc.
However , this link operation adds some bitcast instructions to functions because suffix are added to structure types during the link, therefore when kubo execute these paths ,it will crash. How can I generate vmlinux and avoid this?
My kernel version is 5.4.1
the example:
%call51 = call i32 @unshare_nsproxy_namespaces(...) #8
which change to
%30 = bitcast i32 (i64, %struct.nsproxy.49395**, %struct.cred.49401*, %struct.fs_struct*)* @unshare_nsproxy_namespaces to i32 (i64, %struct.nsproxy.42579**, %struct.cred*, %struct.fs_struct.42465*)*
%call35 = call i32 %30(i64 %6, %struct.nsproxy.42579** nonnull %new_nsproxy, %struct.cred* null, %struct.fs_struct.42465* %29)
when kubo execute this node , it will crash.
Besides, is the clang in the llvm/kubo-bins-9.0/build/bin your modified frontend compiler?
I specify this compiler to wllvm to extract vmlinux.
hello
I have 2 questions:
1- why do not you use wllvm for IR generation for the whole Linux? it seems that you are generating and grouping them with irgen, group, and trans commands. what are these doing more than wllvm?
2- In the Credit section, you said you are using pex for call graph analysis. I couldn't find where are you generating the call graph and where do you save it? in the pex repository description also it doesn't say that this repo is for the call graph generation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.