
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

EECS 598-2 Paper Summary Checking System Rules Using System-Specific, Programmer-Written Compiler Extensions Kevin Borders This paper by Dawson Engler describes a new way of automatic code verification. The authors used meta-level compilation (MC) to write compiler extensions which could check code for simple rule violations. This way, the compiler could detect many logic errors in addition to the set of syntax error and “warnings” that it already flags. The motivation behind this paper is to provide an additional tool that can aid in program verification and enhance both security and correctness. Traditionally, number of methods can be used for code verification. First and foremost is manual inspection. This is a very expensive and not so reliable way of making sure your code is correct. Humans take a very long time to inspect code that can be processed by the system presented in this paper in a matter of seconds. MC extensions can analyze hundreds of thousands of lines on the order of a few hours. It would take weeks, and perhaps even months for a team of skilled programmers to analyze the same code. Human inspection cannot be the only method of program verification for any large piece of software. One of the most popular methods of verification is rigorous testing. Runtime testing is a necessity for any computer program today. The problem with runtime verification, however, is that it does not always expose more obscure bugs in software. A lot of the bugs which show up after release may only occur very rarely and were not found by runtime testing for that reason. It is also difficult to create test environments which will exercise all the functionality of the software and account for every way which it will be put to use by customers. A method of program verification in addition to runtime testing would be highly beneficial in finding the more obscure bugs. Meta Compilation provides a new way of verifying code which discovers many bugs left hidden by testing and manual inspection. In the authors’ implementation of MC, the extensions are written in a state-machine language called metal. The first example given in the paper of a metal state machine checks whether interrupts are enabled when a function returns, or an interrupt enable/disable function is called. The state machine is initially set to the “enabled” state. The compiler then goes through each possible path within a function, and modifies the state machine appropriately at each interrupt enable/disable call. If an interrupt disable function is called with the current state set to “disabled” then an alert is raised. Also, if an enable function is called when interrupts are enabled, or a function has a path that returns in the “disabled” state then an alert is raised. The authors were able to find many legitimate system bugs this way in the linux kernel. The compiler extensions described in this paper were very limited and basic. They only used a simple state machine to check for rule violations involving things such as interrupts and memory allocation. Many of the bugs which are most difficult to find, and perhaps the most dangerous from a security perspective, will still remain undetected even after running this checker. It does prove to be a very useful tool, however, even though it does not completely verify code. Programmers (even highly skilled ones) still make many simple mistakes, and the compiler extensions presented in this paper can do a great deal to find many of those errors before software is released to the public.