Ahead of time static analysis for automatic generation of debugging interfaces to the Linux kernel

The Linux kernel does not export a stable, well-defined kernel interface, complicating the development of kernel-level services, such as device drivers and file systems. While there does exist a set of functions that are exported to external modules, this set of functions frequently changes, and the functions have implicit, ill-documented preconditions. No specific debugging support is provided. We present Diagnosys, an approach to automatically constructing a debugging interface for the Linux kernel. First, a designated kernel maintainer uses Diagnosys to identify constraints on the use of the exported functions. Based on this information, developers of kernel services can then use Diagnosys to generate a debugging interface specialized to their code. When a service including this interface is tested, it records information about potential problems. This information is preserved following a kernel crash or hang. Our experiments show that the generated debugging interface provides useful log information and incurs a low performance penalty.

[1]  David Lo,et al.  Popularity, Interoperability, and Impact of Programming Languages in 100,000 Open Source Projects , 2013, 2013 IEEE 37th Annual Computer Software and Applications Conference.

[2]  George Candea,et al.  Testing Closed-Source Binary Device Drivers with DDT , 2010, USENIX Annual Technical Conference.

[3]  Yérom-David Bromberg,et al.  Bridging the Gap between Legacy Services and Web Services , 2010, Middleware.

[4]  Greg Kroah-Hartman Things you should never do in the kernel , 2005 .

[5]  Ding Yuan,et al.  Improving Software Diagnosability via Log Enhancement , 2012, TOCS.

[6]  Domenico Cotroneo,et al.  Assessment and Improvement of Hang Detection in the Linux Operating System , 2009, 2009 28th IEEE International Symposium on Reliable Distributed Systems.

[7]  Junfeng Yang,et al.  An empirical study of operating systems errors , 2001, SOSP.

[8]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[9]  George Candea,et al.  Efficient Testing of Recovery Code Using Fault Injection , 2011, TOCS.

[10]  Christophe Calvès,et al.  Faults in linux: ten years later , 2011, ASPLOS XVI.

[11]  Julia L. Lawall,et al.  WYSIWIB: A declarative approach to finding API protocols and bugs in Linux code , 2009, DSN.

[12]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[13]  Zhen Xiao,et al.  HEALERS: a toolkit for enhancing the robustness and security of existing applications , 2003, 2003 International Conference on Dependable Systems and Networks, 2003. Proceedings..

[14]  Suresh Jagannathan,et al.  Path-Sensitive Inference of Function Precedence Protocols , 2007, 29th International Conference on Software Engineering (ICSE'07).

[15]  Dawson R. Engler,et al.  Bugs as deviant behavior: a general approach to inferring errors in systems code , 2001, SOSP.

[16]  Mark Strembeck,et al.  An approach for the systematic development of domain‐specific languages , 2009, Softw. Pract. Exp..

[17]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[18]  Zhenmin Li,et al.  PR-Miner: automatically extracting implicit programming rules and detecting violations in large software code , 2005, ESEC/FSE-13.

[19]  Robert Hirschfeld,et al.  Dynamic contract layers , 2010, SAC '10.

[20]  Greg Kroah-Hartman,et al.  Linux Device Drivers , 1998 .

[21]  Aran Donohue,et al.  Debugging Domain-Specific Languages , 2010 .

[22]  Isil Dillig,et al.  Reasoning about the unknown in static analysis , 2010, Commun. ACM.

[23]  Jacques Klein,et al.  Got issues? Who cares about it? A large scale investigation of issue trackers from GitHub , 2013, 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE).

[24]  Dan Tsafrir,et al.  Fine grained kernel logging with KLogger: experience and insights , 2007, EuroSys '07.

[25]  Julia L. Lawall,et al.  Documenting and automating collateral evolutions in linux device drivers , 2008, Eurosys '08.

[26]  Greg Nelson,et al.  Extended static checking for Java , 2002, PLDI '02.

[27]  Leonid Ryzhyk,et al.  Dingo: taming device drivers , 2009, EuroSys '09.

[28]  Rob Williams,et al.  Linux device drivers , 2006 .

[29]  Wolfgang Küchlin,et al.  Integrated Static Analysis for Linux Device Driver Verification , 2007, IFM.

[30]  Valentin Goranko,et al.  Logic in Computer Science: Modelling and Reasoning About Systems , 2007, J. Log. Lang. Inf..

[31]  Ding Yuan,et al.  SherLog: error diagnosis by connecting clues from run-time logs , 2010, ASPLOS XV.

[32]  Julia L. Lawall,et al.  Diagnosys: automatic generation of a debugging interface to the Linux kernel , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[33]  Sriram K. Rajamani,et al.  Thorough static analysis of device drivers , 2006, EuroSys.

[34]  Tegawendé F. Bissyandé Contributions for Improving Debugging of Kernel-level Services in a Monolithic Operating System. (Contributions à l'Amélioration du Débogage des Services Noyau dans un Système d'Exploitation Monolithique) , 2013 .

[35]  Alexander Aiken,et al.  Verifying the Safety of User Pointer Dereferences , 2008, 2008 IEEE Symposium on Security and Privacy (sp 2008).

[36]  Bertrand Meyer,et al.  Uncovering Hidden Contracts: The .NET Example , 2003, Computer.

[37]  Jorge Sousa Pinto,et al.  Verification conditions for source-level imperative programs , 2011, Comput. Sci. Rev..

[38]  Julia L. Lawall,et al.  Tracking code patterns over multiple software versions with Herodotos , 2010, AOSD.

[39]  Alessandro Orso,et al.  Are automated debugging techniques actually helping programmers? , 2011, ISSTA '11.

[40]  K. Rustan M. Leino,et al.  Houdini, an Annotation Assistant for ESC/Java , 2001, FME.

[41]  Yérom-David Bromberg,et al.  Implementing an embedded compiler using program transformation rules , 2015, Softw. Pract. Exp..

[42]  Jean Arlat,et al.  Characterization of the impact of faulty drivers on the robustness of the Linux kernel , 2004, International Conference on Dependable Systems and Networks, 2004.

[43]  Archana Ganapathi,et al.  Windows XP Kernel Crash Analysis , 2006, LISA.

[44]  Xi Wang,et al.  Software fault isolation with API integrity and multi-principal modules , 2011, SOSP.