Documenting and automating collateral evolutions in Linux device drivers

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review

  • Yoann Padioleau
  • René Rydhof Hansen
  • Julia Lawall
  • Gilles Muller
The internal libraries of Linux are evolving
rapidly, to address new requirements and improve performance. These
evolutions, however, entail a massive problem of collateral evolution
in Linux device drivers: for every change that affects an API, all
dependent drivers must be updated accordingly. Manually performing such
collateral evolutions is time-consuming and unreliable, and has lead to
errors when modifications have not been done consistently.

In this paper, we present an automatic program transformation tool,
Coccinelle, for documenting and automating device driver collateral
evolutions. Because Linux programmers are accustomed to manipulating
program modifications in terms of patch files, this tool uses a language
based on the patch syntax to express transformations, extending
patches to semantic patches. Coccinelle preserves the coding style of
the original driver, as would a human programmer.

We have evaluated our approach on 62 representative collateral
evolutions that were previously performed manually in Linux 2.5 and 2.6. On
a test suite of over 5800 relevant driver files, the semantic patches for
these collateral evolutions update over 93% of the files completely.
In the remaining cases, the user is typically alerted to a partial match
against the driver code, identifying the files that must be considered
manually. We have additionally identified over 150 driver files where
the maintainer made an error in performing the collateral evolution, but
Coccinelle transforms the code correctly. Finally, several patches derived
from the use of Coccinelle have been accepted into the Linux kernel.
Original languageEnglish
Title of host publicationEuroSys '08 : Proceedings of the EuroSys 2008 Conference, March 31-April 4, 2008, Glasgow, Scotland, UK
PublisherAssociation for Computing Machinery
Publication date2008
Pages247-260
ISBN (Print)978-1-60558-013-5
DOIs
Publication statusPublished - 2008
EventEuropean Conference on computer systems - Glasgow, United Kingdom
Duration: 31 Mar 20084 Apr 2008
Conference number: 3

Conference

ConferenceEuropean Conference on computer systems
Nummer3
LandUnited Kingdom
ByGlasgow
Periode31/03/200804/04/2008
SeriesOperating Systems Review
Number42(4)
ISSN0163-5980

ID: 9878652