Giter VIP home page Giter VIP logo

kernel-call-graph's Introduction

kernel-call-graph

try to find buggy path

run

make clean # clean files
make  #build pass.so, buggy.bc
make run #produce cg.txt with call graph info in buggy.c
python cg.py # show call graph

ideas

  1. 第一步,我需要找到调用了might_sleep(用M表示)的所有call graph路径. A-->...-->{...M...}-->Z
  2. 第二步,然后分析这些路径中位于M之前的函数集合是否有属于atomic_context的,且没有改变,把此属性一直传递到M,就出错了。

problems

  1. 广度:如何得到尽量完整的call graph? 如何解决函数指针问题?
  2. 精度:如何加入path-sensitive信息?提高 call graph的精度?
  3. atomic_context的识别?何时跟踪aotmic context的变化? 何时enable? 何时disable? 需要体现在 node中

example

buggy.c 是一个程序,其生成的call graph为cg.txt

o 
e 
f e 
d might_sleep f 
c d 
b c 
intr_atomic b o 
a b f 
sys_read a o 
foo printf 
main foo a 

这是用pass.cpp生成出来的。 下面的路径是non-atomic path A,这是从syscall的起始出发,最终由于等待等原因,调用了might_sleep

sys_read-->a-->b-->c-->d-->might_sleep 

下面的路径是atomic path B,这是一个中断处理路径

intr_atomic--> b -->c -->d --> might_sleep

由于调度或中断原因在执行path A过程中,会出现中断,导致path B也会执行,就会出现rt bug。

kernel-call-graph's People

Contributors

chyyuu-tsinghua-cs avatar uuyych avatar chyyuu avatar

Stargazers

Wen Yang avatar  avatar Ted Mostly avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.