kengiter / lrsan Goto Github PK
View Code? Open in Web Editor NEWLRSan: Detecting Lacking-Recheck Bugs in OS Kernels
LRSan: Detecting Lacking-Recheck Bugs in OS Kernels
Hi,
I encountered some problems when compiling the Linux kernel with LLVM. Could you describe the detailed steps of compiling the Linux kernel?
Thanks
When I was reading lrsan code, I could not find the definition of findLackingChecks() in /lrsan/analyzer/src/lib/CriticalVar.h.
line 171: bool findLackingChecks(Value *V, Instruction *CI);
@kengiter
Something is confusing me.
in CriticalVar.cc line 1119, it should be CV->users() or cvAddr->users()?
Please checkout this test.c https://github.com/zhanggenex/mylr/blob/master/test.c and test.ll https://github.com/zhanggenex/mylr/blob/master/test.ll.
Since CV is %3 = load i32, i32* @x, align 4
, so CV->users() will only return %4 = icmp sgt i32 %3, 2
. In this situation, def-use chain in test.c cannot be built and bugs is not found.
However, cvAddr is @x = dso_local global i32 1, align 4
, cvAddr->users() has%12 = load i32, i32* @x, align 4
, store i32 %11, i32* @x, align 4
, %6 = load i32, i32* @x, align 4
and %3 = load i32, i32* @x, align 4
. And the program can execute correctly.
So where could be the problem?
Hi, I am trying to reproduce your work in the paper and encounter some issues.
Operating system: Ubuntu 16.04
LLVM version: 7.0.0
I successfully build llvm and lrsan analyzer. For preparing llvm bitcode files I am using your tool to successfully generate 16802 bitcode files(for linux kernel 4.17).
However, after I run the lrsan, it shows nothing about the lacking recheck bugs. The output I am getting is like:
[CallGraph] Initializing 16802 modules.....
[CallGraph /1][1/16082][$bcfile's path]
...
[CallGraph /1][16082/16082][$bcfile's path]
[CallGraph] Updated in 0 modules.
[CallGraph] Postprocessing ...
[CallGraph] Done!
[PointerAnalysis] Initializing 16802 modules.....
[PointerAnalysis /1][1/16082][$bcfile's path]
...
[PointerAnalysis /1][16082/16082][$bcfile's path]
[PointerAnalysis] Updated in 0 modules.
[PointerAnalysis] Postprocessing ...
[PointerAnalysis] Done!
[CriticalVar] Initializing 16802 modules.....
[CriticalVar /1][1/16082][$bcfile's path]
...
[CriticalVar /1][16082/16082][$bcfile's path]
[CriticalVar] Updated in 0 modules.
[CriticalVar] Postprocessing ...
[CriticalVar] Done!
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.