17.01.2014 Views

Operating system verification—An overview

Operating system verification—An overview

Operating system verification—An overview

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

28 Gerwin Klein<br />

that achieves very high assurance of software implementation correctness for a comparatively<br />

cheap price: formal, mathematical proof. Formal methods held much promise in the 1970s<br />

but failed to deliver. It is our view that this situation has changed drastically. We now have<br />

the methods, tools, and people to achieve what was the goal then. Formal, machine-checked,<br />

mathematical proof that a given program correctly implements a formal specification is eminently<br />

achievable for important classes of software.<br />

The main factors that influence the practicability of formal correctness proofs are the level<br />

of detail, the complexity, and the size of a program. The level of detail might be very abstract.<br />

For example, one might be interested in only whether the general idea of a high-level security<br />

policy works. In other projects, the level of detail might be much higher, including direct<br />

hardware interaction and low-level protocols, with the focus on showing that an implementation<br />

covers all possibilities and will work correctly under all circumstances. The second<br />

dimension, complexity, is the inherent complexity of the problem. Some problems can be<br />

encoded in restricted logics that offer a high degree of efficient automation, making verification<br />

as simple as the push of a button. Many interesting problems fall into this category.<br />

Other problems will require the use of more general logics where proofs need to be guided<br />

interactively by humans with the machine offering assistance and proof checking. The size<br />

of the program to be verified plays a crucial role. Depending on the nature of the problem<br />

the software solves, the effort needed for verification does not necessarily scale linearly, but<br />

sometimes exponentially or worse. Usually, size does matter.<br />

The exception is formal verification on very abstract levels. This usually considers only<br />

parts of software <strong>system</strong>s and would thus not be much constrained by the size dimension.<br />

Simple properties of high-level models are often easy to verify.<br />

Formal verification of medium-level models of larger <strong>system</strong>s has been demonstrated<br />

before. These model the <strong>system</strong> fairly precisely, but not at the level of a C implementation.<br />

Achievable program size here would be in the area of 100,000 lines of code (loc) of the final<br />

<strong>system</strong>. The VerifiCard project (Jacobs et al 2001), for instance, modelled the full JavaCard<br />

platform, including the source language, the compiler, and the JCVM machine language.<br />

Proofs included a number of complex security and safety properties of the platform and the<br />

correctness of the compiler. This was a major collaborative effort, but its results show that<br />

a very high degree of assurance at this level can be achieved. For comparison, full certification<br />

of the JavaCard platform to high security levels like Common Criteria EAL 7 seemed<br />

prohibitive to industry before this project, and was mostly abandoned. Now, Gemalto, for<br />

instance, commercially offers such a certified platform using essentially the same verification<br />

technology.<br />

Formal verification of low-level implementations has so far been considered prohibitively<br />

expensive, or even impossible. In recent years, this view has been changing and there are a<br />

number of verification projects that target realistic amounts of low-level code. An obvious<br />

application area are <strong>Operating</strong> Systems (OS). The OS is at the core of almost every computer<br />

<strong>system</strong>, and a recent renewed trend in operating <strong>system</strong>s towards microkernels means that the<br />

size of the program to be verified is only around 10,000 loc. The properties to be considered<br />

range from fairly simple, e.g. memory safety, to very complex, e.g. implementing a full<br />

specification of behaviour.<br />

It is this combination of low-level, complex property, roughly 10,000 loc that is still considered<br />

intractable in industry. Given the size of case studies that were published up to only 3<br />

years ago, this impression is not surprising. However, it does not necessarily reflect the capabilities<br />

of the field. We aim to show that it is not only possible, but in fact can be cheaper to<br />

use formal verification instead of traditional methods for this area.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!