Skip to main content
Top

2020 | OriginalPaper | Chapter

Separation Logic-Based Verification Atop a Binary-Compatible Filesystem Model

Authors : Mihir Parang Mehta, William R. Cook

Published in: Formal Methods: Foundations and Applications

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Filesystems have held the interest of the formal verification community for a while, with several high-performance filesystems constructed with accompanying proofs of correctness. However, the question of verifying an existing filesystem and incorporating filesystem-specific guarantees remains unexplored, leaving those application developers underserved who need to work with a specific filesystem known to be fit for their purpose. In this work, we present an implementation of a verified filesystem which matches the specification of an existing filesystem, and with our new model AbsFAT tie it to the reasoning framework of separation logic in order to verify properties of programs which use the filesystem. This work is intended to match the target filesystem, FAT32, at a binary level and return the same data and error codes returned by mature FAT32 implementations, considered canonical. We provide a logical framework for reasoning about program behavior when filesystem calls are involved in terms of separation logic, and adapt it to simplify and automate the proof process in ACL2. By providing this framework, we encourage and facilitate greater adoption of software verification by application developers.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Footnotes
1
We use the values \(\mathsf {ENOENT}\), \(\mathsf {ENOTDIR}\) as the return values of system calls, but POSIX enumerates these as values assigned to the global variable errno, which is different from the function’s actual return value. Our implementation of each system call must return both these values, in order to capture the entirety of the effect of the system call in ACL2, a functional language lacking global program state. For brevity in this paper, however, we find it convenient to refer to a single return value which is zero in the case of success, and one of the errno values enumerated by POSIX  [15] in the case of failure. This is no less informative than providing the return value and the errno value separately, since none of our system calls sets errno to 0 upon success.
 
2
We replace inodes in the original grammar with strings. In FAT32, with no hardlinks, it is easier to just represent the contents of regular files as strings.
 
3
This is a term from ACL2 lore, and often used in the ACL2 source code.
 
Literature
2.
go back to reference Amani, S., et al.: Cogent: verifying high-assurance file system implementations. ACM SIGPLAN Not. 51(4), 175–188 (2016)CrossRef Amani, S., et al.: Cogent: verifying high-assurance file system implementations. ACM SIGPLAN Not. 51(4), 175–188 (2016)CrossRef
3.
go back to reference Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development: Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)CrossRef Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development: Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)CrossRef
4.
go back to reference Chajed, T., Tassarotti, J., Kaashoek, M.F., Zeldovich, N.: Argosy: verifying layered storage systems with recovery refinement. In: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 1054–1068. ACM (2019) Chajed, T., Tassarotti, J., Kaashoek, M.F., Zeldovich, N.: Argosy: verifying layered storage systems with recovery refinement. In: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 1054–1068. ACM (2019)
5.
go back to reference Chen, H., et al.: Verifying a high-performance crash-safe file system using a tree specification. In: Proceedings of the 26th Symposium on Operating Systems Principles (SOSP), pp. 270–286. ACM (2017) Chen, H., et al.: Verifying a high-performance crash-safe file system using a tree specification. In: Proceedings of the 26th Symposium on Operating Systems Principles (SOSP), pp. 270–286. ACM (2017)
6.
go back to reference Chen, H., Ziegler, D., Chajed, T., Chlipala, A., Kaashoek, M.F., Zeldovich, N.: Using crash Hoare logic for certifying the FSCQ file system. In: USENIX Annual Technical Conference (USENIX ATC 2016). USENIX Association (2016) Chen, H., Ziegler, D., Chajed, T., Chlipala, A., Kaashoek, M.F., Zeldovich, N.: Using crash Hoare logic for certifying the FSCQ file system. In: USENIX Annual Technical Conference (USENIX ATC 2016). USENIX Association (2016)
9.
go back to reference Goel, S.: Formal verification of application and system programs based on a validated x86 ISA model. Ph.D. thesis, Department of Computer Science, The University of Texas at Austin (2016) Goel, S.: Formal verification of application and system programs based on a validated x86 ISA model. Ph.D. thesis, Department of Computer Science, The University of Texas at Austin (2016)
10.
go back to reference Hesselink, W.H., Lali, M.: Formalizing a hierarchical file system. Electron. Not. Theoret. Comput. Sci. 259, 67–85 (2009). Proceedings of the 14th BCS-FACS Refinement Workshop (REFINE) Hesselink, W.H., Lali, M.: Formalizing a hierarchical file system. Electron. Not. Theoret. Comput. Sci. 259, 67–85 (2009). Proceedings of the 14th BCS-FACS Refinement Workshop (REFINE)
11.
go back to reference Hoare, C.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)CrossRef Hoare, C.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)CrossRef
12.
go back to reference Ileri, A., Chajed, T., Chlipala, A., Kaashoek, F., Zeldovich, N.: Proving confidentiality in a file system using DiskSec. In: 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI), pp. 323–338. USENIX Association, October 2018 Ileri, A., Chajed, T., Chlipala, A., Kaashoek, F., Zeldovich, N.: Proving confidentiality in a file system using DiskSec. In: 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI), pp. 323–338. USENIX Association, October 2018
13.
go back to reference Kerrisk, M.: Basename (3)-Linux manual page. Accessed 01 Aug 2020 Kerrisk, M.: Basename (3)-Linux manual page. Accessed 01 Aug 2020
14.
go back to reference Kerrisk, M.: Dirname (3)-Linux manual page. Accessed 01 Aug 2020 Kerrisk, M.: Dirname (3)-Linux manual page. Accessed 01 Aug 2020
15.
go back to reference Kerrisk, M.: Errno (3)-Linux manual page. Accessed 01 Oct 2019 Kerrisk, M.: Errno (3)-Linux manual page. Accessed 01 Oct 2019
16.
go back to reference Koh, N., et al.: From C to interaction trees: specifying, verifying, and testing a networked server. In: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP), pp. 234–248. ACM (2019) Koh, N., et al.: From C to interaction trees: specifying, verifying, and testing a networked server. In: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP), pp. 234–248. ACM (2019)
17.
go back to reference Kaufmann, M., Manolios, P., Moore, J.S.: Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers, Dordrecht (2000)CrossRef Kaufmann, M., Manolios, P., Moore, J.S.: Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers, Dordrecht (2000)CrossRef
18.
go back to reference Mehta, M.P., Cook, W.R.: Binary-compatible verification of filesystems with ACL2. In: 10th International Conference on Interactive Theorem Proving (ITP). Leibniz International Proceedings in Informatics (LIPIcs), vol. 141, pp. 25:1–25:18. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2019) Mehta, M.P., Cook, W.R.: Binary-compatible verification of filesystems with ACL2. In: 10th International Conference on Interactive Theorem Proving (ITP). Leibniz International Proceedings in Informatics (LIPIcs), vol. 141, pp. 25:1–25:18. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2019)
20.
go back to reference Morgan, C., Sufrin, B.: Specification of the UNIX filing system. IEEE Trans. Softw. Eng. SE-10(2), 128–142 (1984) Morgan, C., Sufrin, B.: Specification of the UNIX filing system. IEEE Trans. Softw. Eng. SE-10(2), 128–142 (1984)
23.
go back to reference Nipkow, T., Wenzel, M., Paulson, L.C.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic, vol. 2283. Springer, Heidelberg (2002)CrossRef Nipkow, T., Wenzel, M., Paulson, L.C.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic, vol. 2283. Springer, Heidelberg (2002)CrossRef
24.
go back to reference Ntzik, G., da Rocha Pinto, P., Sutherland, J., Gardner, P.: A concurrent specification of POSIX file systems. In: 32nd European Conference on Object-Oriented Programming (ECOOP). Leibniz International Proceedings in Informatics (LIPIcs), vol. 109, pp. 4:1–4:28. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018) Ntzik, G., da Rocha Pinto, P., Sutherland, J., Gardner, P.: A concurrent specification of POSIX file systems. In: 32nd European Conference on Object-Oriented Programming (ECOOP). Leibniz International Proceedings in Informatics (LIPIcs), vol. 109, pp. 4:1–4:28. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018)
26.
go back to reference Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 55–74. IEEE Computer Society (2002) Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 55–74. IEEE Computer Society (2002)
28.
go back to reference Sigurbjarnarson, H., Bornholt, J., Torlak, E., Wang, X.: Push-button verification of file systems via crash refinement. In: 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI), pp. 1–16. USENIX Association, November 2016 Sigurbjarnarson, H., Bornholt, J., Torlak, E., Wang, X.: Push-button verification of file systems via crash refinement. In: 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI), pp. 1–16. USENIX Association, November 2016
29.
go back to reference Wright, A.: Structural separation logic. Ph.D. thesis, Imperial College London (2013) Wright, A.: Structural separation logic. Ph.D. thesis, Imperial College London (2013)
Metadata
Title
Separation Logic-Based Verification Atop a Binary-Compatible Filesystem Model
Authors
Mihir Parang Mehta
William R. Cook
Copyright Year
2020
DOI
https://doi.org/10.1007/978-3-030-63882-5_10

Premium Partner