Mining Kbuild to Detect Variability Anomalies in Linux

The Linux kernel is extensively specialized or configured so that it can be used for many purposes. This variability is implemented by means of three distinct artifacts: source code files, Kconfig (configuration) files, and Make files. Any inconsistencies between these three can lead to undesirable anomalies which can lead to increased maintenance efforts or decreased reliability. This paper extends published work that had found anomalies (dead and undead code blocks) by concentrating largely on code and Kconfig files. We detect further anomalies in the Linux kernel when we also consider the Make files. At the level of code blocks, our work exposes many additional anomalies - more than we could study manually. We found that when we lift the level from code blocks to code files, the detected anomalies became easier to study and understand and thus more useful to the developer. By means of examples, we illustrate how the anomalies we detect can lead to undesired behavior. We show how, over time, developers tend to find and delete such anomalies. We suggest that automatic detection of such anomalies has the potential to decrease maintenance efforts and increase reliability.

[1]  Julio Sincero,et al.  Facing the Linux 8000 Feature Nightmare , 2010 .

[2]  Kai Germaschewski Kernel configuration and building in Linux 2.5 , 2010 .

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

[4]  Peter Miller Recursive Make Considered Harmful , 2008 .

[5]  Wolfgang Schröder-Preikschat,et al.  Efficient extraction and analysis of preprocessor-based variability , 2010, GPCE '10.

[6]  Krzysztof Czarnecki,et al.  The Variability Model of The Linux Kernel , 2010, VaMoS.

[7]  Rafael Lotufo April On the Complexity of Maintaining the Linux Kernel Configuration , 2009 .

[8]  Niels Jørgensen,et al.  Safeness of Make-Based Incremental Recompilation , 2002, FME.

[9]  Krzysztof Czarnecki,et al.  Feature-to-Code Mapping in Two Large Product Lines , 2010, SPLC.

[10]  Wolfgang De Meuter,et al.  The Evolution of the Linux Build System , 2007, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[11]  Shane McIntosh,et al.  The evolution of Java build systems , 2012, Empirical Software Engineering.

[12]  Wolfgang Schröder-Preikschat,et al.  Dead or Alive: finding zombie features in the Linux kernel , 2009, FOSD '09.

[13]  Sarah Nadi,et al.  Make it or Break it: Mining Anomalies from Linux Kbuild , 2011, 2011 18th Working Conference on Reverse Engineering.

[14]  Sebastian Erdweg,et al.  Variability-aware parsing in the presence of lexical macros and conditional compilation , 2011, OOPSLA '11.

[15]  Wolfgang De Meuter,et al.  Design recovery and maintenance of build systems , 2007, 2007 IEEE International Conference on Software Maintenance.

[16]  Krzysztof Czarnecki,et al.  Evolution of the Linux Kernel Variability Model , 2010, SPLC.