Documenting and automating collateral evolutions in Linux device drivers
Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
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.
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 language | English |
---|---|
Title of host publication | EuroSys '08 : Proceedings of the EuroSys 2008 Conference, March 31-April 4, 2008, Glasgow, Scotland, UK |
Publisher | Association for Computing Machinery |
Publication date | 2008 |
Pages | 247-260 |
ISBN (Print) | 978-1-60558-013-5 |
DOIs | |
Publication status | Published - 2008 |
Event | European Conference on computer systems - Glasgow, United Kingdom Duration: 31 Mar 2008 → 4 Apr 2008 Conference number: 3 |
Conference
Conference | European Conference on computer systems |
---|---|
Nummer | 3 |
Land | United Kingdom |
By | Glasgow |
Periode | 31/03/2008 → 04/04/2008 |
Series | Operating Systems Review |
---|---|
Number | 42(4) |
ISSN | 0163-5980 |
ID: 9878652