Fast and Precise Retrieval of Forward and Back Porting Information for Linux Device Drivers

Porting Linux device drivers to target more recent and older Linux kernel versions to compensate for the ever-changing kernel interface is a continual problem for Linux device driver developers. Acquiring information about interface changes is a necessary, but tedious and error prone, part of this task. In this paper, we propose two tools, Prequel and gcc-reduce, to help the developer collect the needed information. Prequel provides language support for querying git commit histories, while gcc-reduce translates error messages produced by compiling a driver with a target kernel into appropriate Pre-quel queries. We have used our approach in porting 33 device driver files over up to 3 years of Linux kernel history , amounting to hundreds of thousands of commits. In these experiments, for 3/4 of the porting issues, our approach highlighted commits that enabled solving the porting task. For many porting issues, our approach retrieves relevant commits in 30 seconds or less.

[1]  Wei Wu,et al.  AURA: a hybrid approach to identify framework evolution , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[2]  Name M. Lastname Automatically Finding Patches Using Genetic Programming , 2013 .

[3]  Julia L. Lawall,et al.  Documenting and automating collateral evolutions in linux device drivers , 2008, Eurosys '08.

[4]  Wolfgang Schröder-Preikschat,et al.  Feature consistency in compile-time-configurable system software: facing the linux 10,000 feature problem , 2011, EuroSys '11.

[5]  Damien Doligez,et al.  A foundation for flow-based program matching: using temporal logic and model checking , 2009, POPL '09.

[6]  Lu Zhang,et al.  A history-based matching approach to identification of framework evolution , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[7]  Julia L. Lawall,et al.  Increasing Automation in the Backporting of Linux Drivers Using Coccinelle , 2015, 2015 11th European Dependable Computing Conference (EDCC).

[8]  Harald C. Gall,et al.  Classifying Change Types for Qualifying Change Couplings , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[9]  Coen De Roover,et al.  Extracting executable transformations from distilled code changes , 2017, 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[10]  Julia Lawall,et al.  Prequel: A Patch-Like Query Language for Commit History Search , 2016 .

[11]  David Lo,et al.  Recommending Code Changes for Automatic Backporting of Linux Device Drivers , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[12]  Andrew W. Appel,et al.  Modern Compiler Implementation in ML , 1997 .

[13]  Matias Martinez,et al.  Automatically Extracting Instances of Code Change Patterns with AST Analysis , 2013, 2013 IEEE International Conference on Software Maintenance.