skip to main content
10.1145/2034773.2034827acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Modular verification of preemptive OS kernels

Published:19 September 2011Publication History

ABSTRACT

Most major OS kernels today run on multiprocessor systems and are preemptive: it is possible for a process running in the kernel mode to get descheduled. Existing modular techniques for verifying concurrent code are not directly applicable in this setting: they rely on scheduling being implemented correctly, and in a preemptive kernel, the correctness of the scheduler is interdependent with the correctness of the code it schedules. This interdependency is even stronger in mainstream kernels, such as Linux, FreeBSD or XNU, where the scheduler and processes interact in complex ways.

We propose the first logic that is able to decompose the verification of preemptive multiprocessor kernel code into verifying the scheduler and the rest of the kernel separately, even in the presence of complex interdependencies between the two components. The logic hides the manipulation of control by the scheduler when reasoning about preemptable code and soundly inherits proof rules from concurrent separation logic to verify it thread-modularly. This is achieved by establishing a novel form of refinement between an operational semantics of the real machine and an axiomatic semantics of OS processes, where the latter assumes an abstract machine with each process executing on a separate virtual CPU. The refinement is local in the sense that the logic focuses only on the relevant state of the kernel while verifying the scheduler. We illustrate the power of our logic by verifying an example scheduler, modelled on the one from Linux 2.6.11.

Skip Supplemental Material Section

Supplemental Material

_talk12.mp4

mp4

57.2 MB

References

  1. R.-J. Back. On correct refinement of programs. Journal of Computer and System Sciences, 23:49--68, 1981.Google ScholarGoogle ScholarCross RefCross Ref
  2. D. Bovet and M. Cesati. Understanding the Linux Kernel, 3rd ed. O'Reilly, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Cohen, W. Schulte, and S. Tobies. Local verification of global invariants in concurrent programs. In CAV'10: Conference on Computer-Aided Verification, volume 6174 of LNCS, pages 480--494. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP'10: European Conference on Object-Oriented Programming, pages 504--528. Springer, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. X. Feng, R. Ferreira, and Z. Shao. On the relationship between concurrent separation logic and assume-guarantee reasoning. In ESOP'07: European Conference on Programming, volume 4421 of LNCS, pages 173--188. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. X. Feng, Z. Ni, Z. Shao, and Y. Guo. An open framework for foundational proof-carrying code. In TLDI'07: Workshop on Types in Language Design and Implementation, pages 67--78. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. X. Feng, Z. Shao, Y. Dong, and Y. Guo. Certifying low-level programs with hardware interrupts and preemptive threads. In PLDI'08: Conference on Programming Language Design and Implementation, pages 170--182. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. X. Feng, Z. Shao, Y. Guo, and Y. Dong. Combining domain-specific and foundational logics to verify complete software systems. In VSTTE'08: Conference on Verified Software: Theories, Tools, Experiments, volume 5295 of LNCS, pages 54--69. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. X. Feng, Z. Shao, A. Vaynberg, S. Xiang, and Z. Ni. Modular verification of assembly code with stack-based control abstractions. In PLDI'06: Conference on Programming Language Design and Implementation, pages 401--414. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Gargano, M. Hillebrand, D. Leinenbach, and W. Paul. On the correctness of operating system kernels. In TPHOLs: Conference on Theorem Proving in Higher Order Logics, volume 3603 of LNCS, pages 1--16. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Gotsman. Logics and analyses for concurrent heap-manipulating programs. PhD Thesis, University of Cambridge, 2009.Google ScholarGoogle Scholar
  12. A. Gotsman, J. Berdine, and B. Cook. Precision and the conjunction rule in concurrent separation logic. In MFPS'11: Conference on Mathematical Foundations of Programming Semantics, 2011. To appear.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Gotsman, J. Berdine, B. Cook, N. Rinetzky, and M. Sagiv. Local reasoning for storable locks and threads. In APLAS'07: Asian Symposium on Programming Languages and Systems, volume 4807 of LNCS, pages 19--37. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Gotsman and H. Yang. Modular verification of preemptive OS kernels (extended version). Available from www.software.imdea.org/~gotsman. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Jones. Splitting atoms safely. Theoretical Computer Science, 375:109--119, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Klein. Operating system verification - an overview. Sādhanā, 34:26--69, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  17. G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, P. Derrin, D. Elkaduwe, K. Engelhardt, R. Kolanski, M. Norrish, T. Sewell, H. Tuch, and S. Winwood. seL4: Formal verification of an OS kernel. In SOSP'09: Symposium on Operating Systems Principles, pages 207--220. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Love. Linux Kernel Development, 3rd ed. Addison Wesley, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. Maeda and A. Yonezawa. Writing an OS kernel in a strictly and statically typed language. In Formal to Practical Security, volume 5458 of LNCS, pages 181--197. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. W. O'Hearn. Resources, concurrency and local reasoning. Theoretical Computer Science, 375:271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS'02: Symposium on Logic in Computer Science, pages 55--74. IEEE, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Turon and M. Wand. A separation logic for refining concurrent objects. In POPL'11: Symposium on Principles of Programming Languages, pages 247--258. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. V. Vafeiadis and M. J. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR'07: Conference on Concurrency Theory, volume 4703 of LNCS, pages 256--271. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Yang and C. Hawblitzel. Safe to the last instruction: automated verification of a type-safe operating system. In PLDI'10: Conference on Programming Language Design and Implementation, pages 99--110. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Modular verification of preemptive OS kernels

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Conferences
                  ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
                  September 2011
                  470 pages
                  ISBN:9781450308656
                  DOI:10.1145/2034773
                  • cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 46, Issue 9
                    ICFP '11
                    September 2011
                    456 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/2034574
                    Issue’s Table of Contents

                  Copyright © 2011 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 19 September 2011

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  ICFP '11 Paper Acceptance Rate33of92submissions,36%Overall Acceptance Rate333of1,064submissions,31%

                  Upcoming Conference

                  ICFP '24

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader