[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2901318.2901341acmotherconferencesArticle/Chapter ViewAbstractPublication PageseurosysConference Proceedingsconference-collections
research-article
Public Access

A study of modern Linux API usage and compatibility: what to support when you're supporting

Published: 18 April 2016 Publication History

Abstract

This paper presents a study of Linux API usage across all applications and libraries in the Ubuntu Linux 15.04 distribution. We propose metrics for reasoning about the importance of various system APIs, including system calls, pseudo-files, and libc functions. Our metrics are designed for evaluating the relative maturity of a prototype system or compatibility layer, and this paper focuses on compatibility with Linux applications. This study uses a combination of static analysis to understand API usage and survey data to weight the relative importance of applications to end users.
This paper yields several insights for developers and researchers, which are useful for assessing the complexity and security of Linux APIs. For example, every Ubuntu installation requires 224 system calls, 208 ioctl, fcntl, and prctl codes and hundreds of pseudo files. For each API type, a significant number of APIs are rarely used, if ever. Moreover, several security-relevant API changes, such as replacing access with faccessat, have met with slow adoption. Finally, hundreds of libc interfaces are effectively unused, yielding opportunities to improve security and efficiency by restructuring libc.

References

[1]
Cert c coding standards---signals. https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=3903. Accessed on 3/21/2016.
[2]
Debian popularity contest. http://popcon.debian.org/by_inst. Accessed on 3/21/2016.
[3]
diet libc: A libc optimized for small size. https://www.fefe.de/dietlibc/. Accessed 3/21/2016.
[4]
The embedded GNU Libc. http://www.eglibc.org/. Accessed on 3/21/2016.
[5]
The GNU C library. https://www.gnu.org/software/libc/. Accessed on 3/21/2016.
[6]
musl libc. http://www.musl-libc.org/. Accessed on 3/21/2016.
[7]
Ubuntu popularity contest. http://popcon.ubuntu.com/by_inst. Accessed on 3/21/2016.
[8]
uClibc. https://www.uclibc.org/. Accessed on 3/21/2016.
[9]
wait4 man page. http://man7.org/linux/man-pages/man2/wait4.2.html. Accessed on 3/21/2016.
[10]
J. J. Amor, J. M. Gonzalez-Barahona, G. Robles, and I. Herraiz. Measuring libre software using debian 3.1 (sarge) as a case study: Preliminary results. UPGRADE - The European Journal for the Informatics Professional, VI(3):13--16, 06 2005.
[11]
J. J. Amor, G. Robles, and J. M. González-Barahona. Measuring Woody: The size of Debian 3.0. CoRR, abs/cs/0506067, 2005.
[12]
J. J. Amor, G. Robles, J. M. González-Barahona, and I. Herraiz. From pigs to stripes: A travel through Debian. In Proceedings of the DebConf5 (Debian Annual Developers Meeting), Helsinki, Finland, 07 2005.
[13]
J. Appavoo, M. A. Auslander, D. Da Silva, D. Edelsohn, O. Krieger, M. Ostrowski, B. S. Rosenburg, R. W. Wisniewski, and J. Xenidis. Providing a Linux API on the scalable K42 kernel. In Proceedings of the USENIX Annual Technical Conference, pages 323--336, 2003.
[14]
V. Atlidakis, J. Andrus, R. Geambasu, D. Mitropoulos, and J. Nieh. POSIX abstractions in modern operating systems: The old, the new, and the missing. In Proceedings of the ACM European Conference on Computer Systems (EuroSys), 2016.
[15]
A. Aviram, S.-C. Weng, S. Hu, and B. Ford. Efficient system-enforced deterministic parallelism. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 1--16, 2010.
[16]
A. Baumann, D. Lee, P. Fonseca, L. Glendenning, J. R. Lorch, B. Bond, R. Olinsky, and G. C. Hunt. Composing OS extensions safely and efficiently with Bascule. In Proceedings of the ACM European Conference on Computer Systems (EuroSys), 2013.
[17]
A. Belay, A. Bittau, A. Mashtizadeh, D. Terei, D. Mazières, and C. Kozyrakis. Dune: Safe user-level access to privileged CPU features. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 335--348, 2012.
[18]
F. Bellard. QEMU, a fast and portable dynamic translator. In Proceedings of the USENIX Annual Technical Conference, pages 41--46, 2005.
[19]
T. Bergan, N. Hunt, L. Ceze, and S. D. Gribble. Deterministic process groups in dos. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 1--16, 2010.
[20]
N. Borisov, R. Johnson, N. Sastry, and D. Wagner. Fixing races for fun and profit: How to abuse atime. In Proceedings of the USENIX Security Symposium, pages 303--314, 2005.
[21]
X. Cai, Y. Gui, and R. Johnson. Exploiting unix file-system races via algorithmic complexity attacks. Oakland, pages 27--41, 2009.
[22]
H. Chen, D. Wagner, and D. Dean. Setuid demystified. In Proceedings of the USENIX Security Symposium, pages 171--190, 2002.
[23]
O. F. de Sousa, M. A. de Menezes, and T. J. P. Penna. Analysis of the package dependency on Debian GNU/Linux. Journal of Computational Interdisciplinary Sciences, 1(2):127--133, 03 2009.
[24]
S. Denis. Linux distributions and applications analysis during linux standard base development. Proceedings of the Spring/-Summer Young Researchers. Colloquium on Software Engineering, 2, 2008.
[25]
J. Dike. User Mode Linux. Prentice Hall, 2006.
[26]
R. Divacky. Linux emulation in FreeBSD. https://www.freebsd.org/doc/en/articles/linux-emulation/, 03 2015. Accessed on 3/21/2016.
[27]
J. R. Douceur, J. Elson, J. Howell, and J. R. Lorch. Leveraging legacy code to deploy desktop applications on the web. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), 2008.
[28]
H. Franke, R. Russel, and M. Kirkwood. Fuss, futexes and furwocks: Fast userlevel locking in Linux. In Ottawa Linux Symposium, 2002.
[29]
J. M. Gonzalez-Barahona, G. Robles, M. Michlmayr, J. J. Amor, and D. M. German. Macro-level software evolution: a case study of a large software compilation. Empirical Software Engineering, 14(3):262--285, 2009.
[30]
P. J. Guo and D. Engler. CDE: Using system call interposition to automatically create portable software packages. In Proceedings of the USENIX Annual Technical Conference, 2011.
[31]
T. Harter, C. Dragga, M. Vaughn, A. C. Arpaci-Dusseau, and R. H. Arpaci-Dusseau. A file is not a file: Understanding the i/o behavior of apple desktop applications. In Proceedings of the ACM SIGOPS Symposium on Operating Systems Principles (SOSP), pages 71--83, 2011.
[32]
H. Härtig, M. Hohmuth, J. Liedtke, J. Wolter, and S. Schönberg. The performance of μ-kernel-based systems. SIGOPS Operating System Review, 31(5):66--77, Oct. 1997.
[33]
B. Jain, C.-C. Tsai, J. John, and D. E. Porter. Practical techniques to obviate setuid-to-root binaries. In Proceedings of the ACM European Conference on Computer Systems (EuroSys), pages 8:1--8:14, 2014.
[34]
S. Jana and V. Shmatikov. Memento: Learning secrets from process footprints. In Proceedings of the IEEE Symposium on Security and Privacy (Oakland), pages 143--157, 2012.
[35]
A. Kadav and M. M. Swift. Understanding modern device drivers. In Proceedings of the ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 87--98, 2012.
[36]
L. Lam and T.-c. Chiueh. Automatic extraction of accurate application-specific sandboxing policy. In E. Jonsson, A. Valdes, and M. Almgren, editors, Recent Advances in Intrusion Detection, volume 3224 of Lecture Notes in Computer Science, pages 1--20. Springer Berlin Heidelberg, 2004.
[37]
R. Nguyen and R. Holt. Life and death of software packages: An evolutionary study of debian. In Proceedings of the 2012 Conference of the Center for Advanced Studies on Collaborative Research, CASCON '12, pages 192--204, 2012.
[38]
N. Palix, G. Thomas, S. Saha, C. Calvès, J. Lawall, and G. Muller. Faults in Linux: Ten years later. In Proceedings of the ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 305--318, 2011.
[39]
A. Pathak, Y. C. Hu, M. Zhang, P. Bahl, and Y.-M. Wang. Fine-grained power modeling for smartphones using system call tracing. In Proceedings of the ACM European Conference on Computer Systems (EuroSys), pages 153--168. ACM, 2011.
[40]
S. Pavel and S. Denis. Binary compatibility of shared libraries implemented in C++ on GNU/Linux systems. Proceedings of the Spring/Summer Young Researchers. Colloquium on Software Engineering, 3, 2009.
[41]
A. Ponomarenko and V. Rubanov. Automatic backward compatibility analysis of software component binary interfaces. In IEEE International Conference on Computer Science and Automation Engineering (CSAE), volume 3, pages 167--173, June 2011.
[42]
D. E. Porter, O. S. Hofmann, C. J. Rossbach, A. Benn, and E. Witchel. Operating system transactions. In Proceedings of the ACM SIGOPS Symposium on Operating Systems Principles (SOSP), pages 161--176, 2009.
[43]
M. Rajagopalan, S. K. Debray, M. A. Hiltunen, and R. D. Schlichting. System call clustering: A profile directed optimization technique. Technical report, The University of Arizona, May 2003.
[44]
G. Robles and J. M. González-Barahona. From toy story to toy history: A deep analysis of Debian GNU/Linux, 2003.
[45]
G. Robles, J. M. Gonzalez-Barahona, M. Michlmayr, and J. J. Amor. Mining large software compilations over time: Another perspective of software evolution. In Proceedings of the International Workshop on Mining Software Repositories, MSR, pages 3--9, 2006.
[46]
SECure COMPuting with Filters (seccomp). https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt. Accessed on 3/12/2016.
[47]
H. Shacham. The geometry of innocent flesh on the bone: Return-into-libc without function calls (on the x86). In Proceedings of the ACM Conference on Computer and Communications Security (CCS), pages 552--561, Oct. 2007.
[48]
J. S. Shapiro, J. M. Smith, and D. J. Farber. EROS: A fast capability system. In Proceedings of the Seventeenth ACM Symposium on Operating Systems Principles, SOSP '99, pages 170--185, 1999.
[49]
H. Singh and A. Kaur. Component compatibility in component based development. International Journal of Computer Science and Mobile Computing, 3:535--541, 06 2014.
[50]
D. Tsafrir, T. Hertz, D. Wagner, and D. D. Silva. Portably preventing file race attacks with user-mode path resolution. Technical report, IBM Research Report, 2008.
[51]
C.-C. Tsai, K. S. Arora, N. Bandi, B. Jain, W. Jannen, J. John, H. A. Kalodner, V. Kulkarni, D. Oliveira, and D. E. Porter. Cooperation and Security Isolation of Library OSes for Multi-Process Applications. In Proceedings of the ACM European Conference on Computer Systems (EuroSys), pages 9:1--9:14, 2014.
[52]
C.-C. Tsai, Y. Zhan, J. Reddy, Y. Jiao, T. Zhang, and D. E. Porter. How to Get More Value from your File System Directory Cache. In Proceedings of the ACM SIGOPS Symposium on Operating Systems Principles (SOSP), 2015.
[53]
X. Wang, Y.-C. Jhi, S. Zhu, and P. Liu. Detecting software theft via system call based birthmarks. In Proceedings of the 2009 Annual Computer Security Applications Conference, ACSAC '09, pages 149--158, 2009.
[54]
J. Wei and C. Pu. TOCTTOU vulnerabilities in UNIX-style file systems: An anatomical study. In Proceedings of the USENIX Conference on File and Storage Technologies (FAST), 2005.
[55]
M. Zalewski. Delivering signals for fun and profit. 2001.
[56]
N. Zeldovich, S. Boyd-Wickizer, E. Kohler, and D. Mazières. Making information flow explicit in HiStar. In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 19--19, 2006.
[57]
M. Zhang and R. Sekar. Control flow integrity for cots binaries. In Proceedings of the USENIX Security Symposium, pages 337--352, 2013.

Cited By

View all
  • (2024)Microkernel goes generalProceedings of the 18th USENIX Conference on Operating Systems Design and Implementation10.5555/3691938.3691963(465-485)Online publication date: 10-Jul-2024
  • (2024)B-Side: Binary-Level Static System Call IdentificationProceedings of the 25th International Middleware Conference10.1145/3652892.3700761(225-237)Online publication date: 2-Dec-2024
  • (2024)Loupe: Driving the Development of OS Compatibility LayersProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624861(249-267)Online publication date: 27-Apr-2024
  • Show More Cited By
  1. A study of modern Linux API usage and compatibility: what to support when you're supporting

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      EuroSys '16: Proceedings of the Eleventh European Conference on Computer Systems
      April 2016
      605 pages
      ISBN:9781450342407
      DOI:10.1145/2901318
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 18 April 2016

      Permissions

      Request permissions for this article.

      Check for updates

      Qualifiers

      • Research-article

      Funding Sources

      Conference

      EuroSys '16
      EuroSys '16: Eleventh EuroSys Conference 2016
      April 18 - 21, 2016
      London, United Kingdom

      Acceptance Rates

      EuroSys '16 Paper Acceptance Rate 38 of 180 submissions, 21%;
      Overall Acceptance Rate 241 of 1,308 submissions, 18%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)756
      • Downloads (Last 6 weeks)101
      Reflects downloads up to 22 Jan 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Microkernel goes generalProceedings of the 18th USENIX Conference on Operating Systems Design and Implementation10.5555/3691938.3691963(465-485)Online publication date: 10-Jul-2024
      • (2024)B-Side: Binary-Level Static System Call IdentificationProceedings of the 25th International Middleware Conference10.1145/3652892.3700761(225-237)Online publication date: 2-Dec-2024
      • (2024)Loupe: Driving the Development of OS Compatibility LayersProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624861(249-267)Online publication date: 27-Apr-2024
      • (2024)TEE-PA: TEE Is a Cornerstone for Remote Provenance Auditing on Edge Devices With Semi-TCBIEEE Access10.1109/ACCESS.2024.336634412(26536-26549)Online publication date: 2024
      • (2023)Real-Time Monitoring and Management of Hardware and Software Resources in Heterogeneous Computer Networks through an Integrated System ArchitectureSymmetry10.3390/sym1506113415:6(1134)Online publication date: 23-May-2023
      • (2023)Dynamic Linkers Are the Narrow Waist of Operating SystemsProceedings of the 12th Workshop on Programming Languages and Operating Systems10.1145/3623759.3624548(26-33)Online publication date: 23-Oct-2023
      • (2023)Veil: A Protected Services Framework for Confidential Virtual MachinesProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 410.1145/3623278.3624763(378-393)Online publication date: 25-Mar-2023
      • (2023)Understanding and Mitigating Twin Function Misuses in Operating System KernelIEEE Transactions on Computers10.1109/TC.2023.324036572:8(2181-2193)Online publication date: 1-Aug-2023
      • (2022)Dynamic Binary Translation for SGX EnclavesACM Transactions on Privacy and Security10.1145/353286225:4(1-40)Online publication date: 9-Jul-2022
      • (2022)H-Container: Enabling Heterogeneous-ISA Container Migration in Edge ComputingACM Transactions on Computer Systems10.1145/352445239:1-4(1-36)Online publication date: 5-Jul-2022
      • Show More Cited By

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Login options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media