Skip to main content
Log in

Light-weight kernel instrumentation framework using dynamic binary translation

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Mobile platforms such as Android and iOS, which are based on typical operating systems, have been widely adopted in various computing devices from smart phones even to smart TVs. Along with this, the necessity of kernel instrumentation framework has also grown up for efficient development and debugging of a kernel itself and its components. Although the existing approaches are providing some information about the kernel state including physical register value and primitive memory map, it is hard for the developers to understand and exploit the information. Moreover, the excessive analysis overhead in the existing approach makes them impractical to be used in real systems. Meanwhile, there have been a few studies on analyzing the user-level applications using dynamic binary translation and they are now widely used. In this paper, by extending this idea of dynamic binary translation for user-level applications to the kernel, we propose a new dynamic kernel instrumentation framework. Our framework focuses on the modules such as device drivers, rather than the kernel itself, since the modules comprise a large portion of OS development. Because of the frequent execution of kernel modules, the dynamic kernel instrumentation framework should guarantee the quality of the translated target code. However, costly optimizations to achieve high execution performance are rather harmful to the overall performance. Therefore, in order to improve performance of both translations, we suggest light-weight translator based on pseudo-machine instruction representation and tabular-base translation instead of typical intermediate representation. We implement our framework on Linux system, and our experimental evaluations show that it could quite effectively instrument the target with nominal overhead.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Ackerman W et al. (2005) The Strace homepage

  2. Bala V, Duesterwald E, Banerjia S (2000) Dynamo: a transparent dynamic optimization system. In: ACM SIGPLAN notices, vol 35. ACM, New York, pp 1–12

    Google Scholar 

  3. Best S (2005) Linux debugging and performance tuning: tips and techniques. Prentice Hall, New York

    Google Scholar 

  4. Branco R (2007) Ltrace internals. In: Linux symposium, p 41

    Google Scholar 

  5. Bruening D (2004) Efficient, transparent, and comprehensive runtime code manipulation. PhD thesis, Massachusetts Institute of Technology

  6. Bungale P, Pinos CL (2007) A programmable framework for whole-system dynamic instrumentation. In: Proceedings of the 3rd international conference on virtual execution environments. ACM, New York, pp 137–147

    Chapter  Google Scholar 

  7. Dinaburg A, Royal P, Sharif M, Lee W (2008) Ether: malware analysis via hardware virtualization extensions. In: Proceedings of the 15th ACM conference on computer and communications security. ACM, New York, pp 51–62

    Chapter  Google Scholar 

  8. Feiner P, Brown A, Goel A (2012) Comprehensive kernel instrumentation via dynamic binary translation. In: Proceedings of the 17th international conference on architectural support for programming languages and operating systems. ACM, New York, pp 135–146

    Google Scholar 

  9. Gereaux A (2005) Linux kernel debugging. Dr Dobb’s J 30(11):51

    Google Scholar 

  10. Graham S, Kessler P, Mckusick M (1982) Gprof: a call graph execution profiler. ACM SIGPLAN Not 17(6):120–126

    Article  Google Scholar 

  11. Grothe D (2001) Kgdb: Linux kernel source level debugger

  12. Haardt M, Coleman M (1999) Ptrace (2)

  13. Kiriansky V, Bruening D, Amarasinghe S (2002) Secure execution via program shepherding. In: Proceedings of the 11th USENIX security symposium, pp 191–206

    Google Scholar 

  14. License G. Gcov: Gnu coverage tool

  15. Luk C, Cohn R, Muth R, Patil H, Klauser A, Lowney G, Wallace S, Reddi V, Pin KH (2005) Building customized program analysis tools with dynamic instrumentation. In: ACM SIGPLAN notices, vol 40. ACM, New York, pp 190–200

    Google Scholar 

  16. Nethercote N, Seward J (2007) Valgrind: a framework for heavyweight dynamic binary instrumentation. ACM SIGPLAN Not 42(6):89–100

    Article  Google Scholar 

  17. Seward J, Nethercote N (2005) Using Valgrind to detect undefined value errors with bit-precision. In: USENIX annual technical conference, pp 17–30

    Google Scholar 

  18. Song D, Brumley D, Yin H, Caballero J, Jager I, Kang M, Liang Z, Newsome J, Poosankam P, Saxena P (2008) Bitblaze: a new approach to computer security via binary analysis. In: Information systems security, pp 1–25

    Chapter  Google Scholar 

  19. Sridhar S, Shapiro J, Northup E, Bungale P (2006) Hdtrans: an open source, low-level dynamic instrumentation system. In: Proceedings of the 2nd international conference on virtual execution environments. ACM, New York, pp 175–185

    Chapter  Google Scholar 

  20. Wimmer C, Franz M (2010) Linear scan register allocation on SSA form. In: Proceedings of the 8th annual IEEE/ACM international symposium on code generation and optimization. ACM, New York, pp 170–179

    Chapter  Google Scholar 

  21. Yaghmour K, Dagenais M (2000) The Linux trace toolkit. Linux J 73:54–57

    Google Scholar 

  22. Zhang L, Krintz C (2004) Adaptive code unloading for resource-constrained JVMs. ACM SIGPLAN Not 39(7):155–164

    Article  MATH  Google Scholar 

  23. Zhang L, Krintz C (2004) Profile-driven code unloading for resource-constrained JVMs. In: Proceedings of the 3rd international symposium on principles and practice of programming in Java. Trinity College, Dublin, pp 83–90

    Google Scholar 

Download references

Acknowledgements

This research was supported by Next-Generation Information Computing Development Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education, Science and Technology (2012-0006423)

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dongwoo Lee.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lee, D., Kim, I., Kim, J. et al. Light-weight kernel instrumentation framework using dynamic binary translation. J Supercomput 66, 1613–1628 (2013). https://doi.org/10.1007/s11227-013-0954-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-013-0954-3

Keywords

Navigation