MOdel-based KERnel Testing (MOKERT) Framework

모델기반의 커널 테스팅 프레이뭐크

  • Published : 2009.07.15

Abstract

Despite the growing need for customized operating system kernels for embedded devices, kernel development continues to suffer from insufficient reliability and high testing cost for several reasons such as the high complexity of the kernel code. To alleviate these difficulties, this study proposes the MOdel-based KERnel Testing (MOKERT) framework for detection of concurrency bugs in the kernel. MOKERT translates a given C program into a corresponding Promela model, and then tries to find a counter example with regard to a given requirement property, If found, MOKERT executes that counter example on the real kernel code to check whether the counter example is a false alarm or not, The MOKERT framework was applied to the Linux proc file system and confirmed that the bug reported in a ChangeLog actually caused a data race problem, In addition, a new data race bug in the Linux proc file system was found, which causes kernel panic.

최근 내장형 시스템이 점점 많은 분야에 사용되며, 시스템에 특화된 운영체제 커널에 대한 필요성이 커지고 있다. 하지만, 커널 개발은 코드의 복잡성 등의 이유로 말미암아 테스팅에 큰 비용이 소요됨에도 불구하고, 높은 신뢰성을 달성하기가 어려운 실정이다. 이러한 커널 개발 및 테스팅의 어려움을 극복하기 위해, 운영체제 커널의 동시성 오류 검출을 지원하는 모델 기반의 커널 테스팅 (MOKERT) 프레임워크를 제안한다. MOKERT 프레임워크는 주어진 C 프로그램을 Promela 정형 명세 모델로 변환하고 나서 Spin 모델검증기를 사용하여 검증하고, 검증반례가 생성된 경우, 이 검증반례를 실제 커널 코드에서 실행을 시켜서 진위를 확인한다. 본 연구에서는 MOKERT 프레임워크를 리눅스 proc파일시스템에 적용하여, ChangeLog에 보고된 오류가 실제로 자원경쟁문제를 일으킴을 확인하였을 뿐만 아니라, 커널 패닉을 일으키는 새로운 오류도 발견하였다.

Keywords

References

  1. G. J. Holzmann and R. Joshi, 'Model-driven software verification,' Spin Workshop, April 2004
  2. G. J. Holzmann, 'The Spin Model Checker,' Wiley, New York, 2003
  3. K. Sen, 'Effective random testing of concurrent programs,' Proceedings of the twenty-second IEEE/ACM International Conference on Automated software engineering, 2007
  4. R. H. Carver and Y. Lei, 'A General Model for Reachability Testing of Concurrent Programs,' IEEE International Conference on Formal Engineering Methods, 2004
  5. M. Christiens, J. D. Choi, M. Ronsse and K. Bosschere, 'Record/Replay in the Presence of Benign Data Races,' In International Conference on Parallel and Distributed Processing Techniques and Applications, 2002
  6. S. Artzi, S. H. Kim, and M. D. Ernst, 'ReCrash: Making Software Failures Reproducible by Preserving Object States,' European Conference on Object-Oriented Programming, 2008
  7. S. Narayanasamy, G. Pokam, and B. Calder, 'Bug-Net: Recording application level execution for deterministic replay debugging,' IEEE Micro, 26(1): 100-109, 2006 https://doi.org/10.1109/MM.2006.7
  8. W. Visser, C. S. Pasareanu and S. Khurshid, 'Test input generation with Java PathFinder,' International Symposium on Software Testing and Analysis, 2004
  9. M. P. E. Heimdahl, S. Rayadurgam, W. Visser, G. Devaraj and J. Gao, 'Auto-generating Test Sequences Using Model Checker: A Case Study,' Formal Approaches to Software Testing, 2004
  10. A. Gargantini, E. Riccobene and S. Rinzivillo, 'Using Spin to Generate Tests from ASM Specifications,' Abstract State Machines, 2003
  11. M. Musuvathi, S. Qadeer and T. Ball, 'Chess: A systematic testing tool for concurrent software,' Microsoft Research Technical Report MSR-TR-2007-149, 2007
  12. D. Beyer, T. A. Henzinger, R. Jhala, and R. Majumdar, 'The software model checker BLAST: Applications to software engineering,' International Journal on Software Tools for Technology Transfer, 2007 https://doi.org/10.1007/s10009-007-0044-z
  13. E. Clarke, D. Kroening, and F. Lerda, 'A tool for checking ANSI-C programs,' Tools And Algorithms for Construction and Analysis of Systems, 2004
  14. P. Camara, M. Gallardo and P. Merino, 'Model extraction for ARINC 653 based avionics software,' Spin workshop, 2007
  15. E. Clarke, O. Grumberg, S. Jha, Y. Lu and H. Veith, 'Counterexample-guided abstraction refinement,' Computer Aided Verification, July 2000
  16. M. Kim, Y. Kim, Y. Choi and H. Kim, 'Pre-testing flash device driver through model checking techniques,' IEEE International Conference on Software Testing, Verification and Validation, April 2008