Advertisement

Automated Software Engineering

, Volume 23, Issue 1, pp 3–41 | Cite as

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

  • Tegawendé F. BissyandéEmail author
  • Laurent Réveillère
  • Julia L. Lawall
  • Gilles Muller
Article

Abstract

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.

Keywords

Diagnosys  Debugging Linux Plugin Reliability Testing 

Notes

Acknowledgments

This work was supported in part by the ANR Blanc Grant ABL.

References

  1. Albinet, A., Arlat, J., Fabre, J.C.: Characterization of the impact of faulty drivers on the robustness of the Linux kernel. In: Proceedings of the 2004 International Conference on Dependable Systems and Networks (DSN’04), pp. 867–876. Florence, Italy (2004)Google Scholar
  2. Arnout, K., Meyer, B.: Uncovering hidden contracts: the.NET example. Computer 36, 48–55 (2003)CrossRefGoogle Scholar
  3. Ball, T., Bounimova, E., Cook, B., Levin, V., Lichtenberg, J., McGarvey, C., Ondrusek, B., Rajamani, S.K., Ustuner, A.: Thorough static analysis of device drivers. In: Proceedings of the 2006 ACM SIGOPS/EuroSys European Conference on Computer Systems (EuroSys’06), pp. 73–85. Leuven, Belgium (2006)Google Scholar
  4. Bissyandé, T.F., Réveillère, L., Bromberg, Y.D., Lawall, J.L., Muller, G.: Bridging the gap between legacy services and web services. In: Proceedings of the ACM/IFIP/USENIX 11th International Conference on Middleware. Middleware ’10, pp. 273–292. Springer, Bangalore (2010)Google Scholar
  5. Bissyandé, T.F., Réveillère, L., Lawall, J.L., Muller, G.: Diagnosys: automatic generation of a debugging interface to the linux kernel. In: Proceedings of 27th IEEE/ACM International Conference on Automated Software Engineering (ASE’12), pp. 60–69. Essen, Germany (2012)Google Scholar
  6. Bissyandé, T.F.: Contributions for improving debugging of kernel-level services in a monolithic operating system. Ph.D. thesis, Université Sciences et Technologies-Bordeaux I (2013)Google Scholar
  7. Bissyandé, T.F., Lo, D., Jiang, L., Réveillère, L., Klein, J., Le Traon, Y.: Got issues? Who cares about it? A large scale investigation of issue trackers from github. In: IEEE 24th International Symposium on Software Reliability Engineering (ISSRE) (2013)Google Scholar
  8. Bissyandé, T.F., Réveillére, L., Lawall, J.L., Bromberg, Y.D., Muller, G.: Implementing an embedded compiler using program transformation rules. Software: Practice and Experience (2013)Google Scholar
  9. Bissyandé, T.F., Thung, F., Lo, D., Jiang, L., Réveillère, L.: Popularity, interoperability, and impact of programming languages in 100,000 open source projects. In: Proceedings of the 37th IEEE Annual Computer Software and Applications Conference (COMPSAC ’13), pp. 303–312. Washington (2013)Google Scholar
  10. Bray, T.: The Bonnie file system benchmark. http://www.textuality.com/bonnie/ (1996)
  11. Bugrara, S., Aiken, A.: Verifying the safety of user pointer dereferences. In: IEEE Symposium on Security and Privacy, pp. 325–338. Oakland (2008)Google Scholar
  12. Chou, A., Yang, J., Chelf, B., Hallem, S., Engler, D.: An empirical study of operating systems errors. In: Proceedings of the 18th ACM Symposium on Operating System Principles (SOSP’01), pp. 73–88. Banff, Canada (2001)Google Scholar
  13. Corbet, J.: Injecting faults into the kernel. http://lwn.net/Articles/209257/ (2004)
  14. Cotroneo, D., Natella, R., Russo, S.: Assessment and improvement of hang detection in the Linux operating system. In: Proceedings of the 28th IEEE International Symposium on Reliable Distributed Systems (SRDS’09), pp. 288–294. Niagara Falls (2009)Google Scholar
  15. Dillig, I., Dillig, T., Aiken, A.: Reasoning about the unknown in static analysis. Commun. ACM 53(8), 115–123 (2010)CrossRefGoogle Scholar
  16. Donahue, A.: Debugging domain-specific languages. Master’s thesis, University of Toronto (2010)Google Scholar
  17. Engler, D., Chen, D.Y., Hallem, S., Chou, A., Chelf, B.: Bugs as deviant behavior: a general approach to inferring errors in systems code. In: Proceedings of the Eighteenth ACM Symposium on Operating Systems Principles (SOSP’01), pp. 57–72. Banff, Alberta (2001)Google Scholar
  18. Ernst, M.D., Perkins, J.H., Guo, P.J., McCamant, S., Pacheco, C., Tschantz, M.S., Xiao, C.: The Daikon system for dynamic detection of likely invariants. Sci. Comput. Program. 69, 35–45 (2007)zbMATHMathSciNetCrossRefGoogle Scholar
  19. Etsion, Y., Tsafrir, D., Kirkpatrick, S., Feitelson, D.G.: Fine grained kernel logging with KLogger: experience and insights. In: EuroSys, pp. 259–272. Lisbon, Portugal (2007)Google Scholar
  20. Fetzer, C., Xiao, Z.: Healers: a toolkit for enhancing the robustness and security of existing applications. In: Proceedings of the 2003 International Conference on Dependable Systems and Networks (DSN’03), pp. 317–322. San Francisco (2003)Google Scholar
  21. Flanagan, C., Leino, K.R.M.: Houdini, an annotation assistant for ESC/Java. FME, pp. 500–517. Springer, London (2001)Google Scholar
  22. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation (PLDI’02), pp. 234–245. Berlin, Germany (2002)Google Scholar
  23. Frade, M.J., Pinto, J.S.: Verification conditions for source-level imperative programs. Comput. Sci. Rev. 5(3), 252–277 (2011)zbMATHCrossRefGoogle Scholar
  24. Ganapathi, A., Ganapathi, V., Patterson, D.: Windows XP kernel crash analysis. In: LISA’06, pp. 49–159. Washington (2006)Google Scholar
  25. Hirschfeld, R., Perscheid, M., Schubert, C., Appeltauer, M.: Dynamic contract layers. In: Proceedings of the 2010 Symposium on Applied Computing (SAC’10), pp. 2169–2175. Sierre, Switzerland (2010)Google Scholar
  26. Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)zbMATHCrossRefGoogle Scholar
  27. Huth, M., Ryan, M.: Logic in Computer Science: Modelling and Reasoning About Systems. Cambridge University Press, Cambridge (2000)Google Scholar
  28. Jones, R.: Netperf: A Network Performance Benchmark, Version 2.4.5. http://www.netperf.org (2000)
  29. Kroah-Hartman, G.: The Linux kernel driver interface (all your questions answered and then some). http://www.kernel.org/doc/Documentation/stable_api_nonsense.txt (2013)
  30. Kroah-Hartman, G.: Driving me nuts: things you should never do in the kernel. Linux J. 133, 9 (2005). http://www.linuxjournal.com/article/8110
  31. Kuznetsov, V., Chipounov, V., Candea, G.: Testing closed-source binary device drivers with DDT. In: USENIX Annual Technical Conference (ATC’10). Boston (2010)Google Scholar
  32. Lawall, J.L., Brunel, J., Palix, N., Hansen, R.R., Stuart, H., Muller, G.: WYSIWIB: a declarative approach to finding API protocols and bugs in Linux code. In: Proceedings of the 2009 International Conference on Dependable Systems and Networks (DSN’09), pp. 43–52. Lisbon, Portugal (2009)Google Scholar
  33. Li, Z., Zhou, Y.: Pr-miner: automatically extracting implicit programming rules and detecting violations in large software code. In: Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE-13), pp. 306–315. Lisbon, Portugal (2005)Google Scholar
  34. Mao, Y., Chen, H., Zhou, D., Wang, X., Zeldovich, N., Kaashoek, M.F.: Software fault isolation with API integrity and multi-principal modules. In: SOSP, pp. 115–128. Cascais, Portugal (2011)Google Scholar
  35. Marinescu, P., Candea, G.: Efficient testing of recovery code using fault injection. ACM Trans. Comput. Syst. (TOCS) 29(3), 1–38 (2011)CrossRefGoogle Scholar
  36. Meyer, B.: Object-Oriented Software Construction, 1st edn. Prentice-Hall, Upper Saddle River (1988)Google Scholar
  37. Mills, C.: Using Design by Contract in C, 1st edn. O’Reilly, Sebastopol (2004). http://www.OnLamp.com
  38. Nellitheertha, H.: Reboot Linux faster using Kexec. http://www.ibm.com/developerworks/linux/library/l-kexec/index.html (2004)
  39. Padioleau, Y., Lawall, J.L., Hansen, R.R., Muller, G.: Documenting and automating collateral evolutions in Linux device drivers. In: Proceedings of the 2008 ACM SIGOPS/EuroSys European Conference on Computer Systems (EuroSys’08), pp. 247–260. Glasgow, Scotland (2008)Google Scholar
  40. Palix, N., Lawall, J., Muller, G.: Tracking code patterns over multiple software versions with herodotos. In: Proceedings of the 2010 International Conference on Aspect-Oriented Software Development (AOSD’10), pp. 169–180. Rennes and Saint-Malo, France (2010)Google Scholar
  41. Palix, N., Saha, S., Thomas, G., Calvès, C., Lawall, J.L., Muller, G.: Faults in Linux: ten years later. In: Proceedings of the 2011 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’11). Newport Beach (2011)Google Scholar
  42. Parnin, C., Orso, A.: Are automated debugging techniques actually helping programmers? In: Proceedings of the 2011 International Symposium on Software Testing and Analysis, pp. 199–209. ACM (2011)Google Scholar
  43. Post, H., Küchlin, W.: Integrated static analysis for Linux device driver verification. In: Proceedings of the 6th International Conference on Integrated Formal Methods (IFM’07), pp. 518–537. Oxford (2007)Google Scholar
  44. Ramanathan, M.K., Grama, A., Jagannathan, S.: Path-sensitive inference of function precedence protocols. In: Proceedings of the 29th International Conference on Software Engineering (ICSE ’07), pp. 240–250. Minneapolis (2007)Google Scholar
  45. Rostedt, S.: Debugging the kernel using ftrace. http://lwn.net/Articles/365835/ (2009)
  46. Rubini, A., Corbet, J.: Linux Device Drivers, 2nd edn, p. 109. O’Reilly Media, Sebastopol (2001)Google Scholar
  47. Ryzhyk, L., Chubb, P., Kuz, I., Heiser, G.: Dingo: taming device drivers. In: Proceedings of the 2009 ACM SIGOPS/EuroSys European Conference on Computer Systems (EuroSys’09), pp. 275–288. Nuremberg, Germany (2009)Google Scholar
  48. Strembeck, M., Zdun, U.: An approach for the systematic development of domain-specific languages. Softw. Pract. Exp. 39(15), 1253–1292 (2009)CrossRefGoogle Scholar
  49. Yuan, D., Mai, H., Xiong, W., Tan, L., Zhou, Y., Pasupath, S.: Sherlog: error diagnosis by connecting clues from run-time logs. In: Proceedings of the 2010 International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’10), pp. 143–154. Pittsburgh (2010)Google Scholar
  50. Yuan, D., Zheng, J., Park, S., Zhou, Y., Savage, S.: Improving software diagnosability via log enhancement. In: ASPLOS, pp. 3–14. Newport Beach (2011)Google Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Tegawendé F. Bissyandé
    • 1
    Email author
  • Laurent Réveillère
    • 2
  • Julia L. Lawall
    • 3
  • Gilles Muller
    • 3
  1. 1.SnTUniversity of LuxembourgLuxembourgLuxembourg
  2. 2.LaBRIUniversity of BordeauxTalenceFrance
  3. 3.Inria/LIP6/UPMC/Sorbonne University RegalParisFrance

Personalised recommendations