Investigating Execution Path Non-determinism in the Linux Kernel
Research output: Contribution to conferences › Paper › Contributed › peer-review
Contributors
Abstract
In Linux, a program executes either in user or kernel context. There is only a limited set of valid inputs
for any program and thus in the absence of faults, the path taken by the program in user space is highly
predictable. In contrast, the input space of the kernel is very large so it is expected that for any program
executing in kernel context, there could be several possible code paths available to be taken during an
execution instance. We set out to investigate the level of non-determinism in the execution path of an
application in the Linux kernel. In our work, we define the path as the set of kernel functions that are
called by a specific system call invoked from the user space by an application. The experiments involved
running a simple program over a large number of iterations and tracing its execution in kernel space using
the Ftrace tool. The trace output was then transferred to a PostgreSQL database for analysis. We report
the early results of our work, focusing on tracing a single system call, the open() call. The frequency
of path occurrences has several peaks representing the common execution paths as well execution paths
that are rarely taken. Further analysis shows that interrupts have an effect both on the execution time
and control flow through the kernel. The result of this preliminary work points to a strong possibility
of both temporal and path non-determinism in tasks executing in kernel space, due to complexity of the
execution environment. This inherent diversity of OS kernel state could be useful in the protection of
replicated systems against residual faults in the execution platform
for any program and thus in the absence of faults, the path taken by the program in user space is highly
predictable. In contrast, the input space of the kernel is very large so it is expected that for any program
executing in kernel context, there could be several possible code paths available to be taken during an
execution instance. We set out to investigate the level of non-determinism in the execution path of an
application in the Linux kernel. In our work, we define the path as the set of kernel functions that are
called by a specific system call invoked from the user space by an application. The experiments involved
running a simple program over a large number of iterations and tracing its execution in kernel space using
the Ftrace tool. The trace output was then transferred to a PostgreSQL database for analysis. We report
the early results of our work, focusing on tracing a single system call, the open() call. The frequency
of path occurrences has several peaks representing the common execution paths as well execution paths
that are rarely taken. Further analysis shows that interrupts have an effect both on the execution time
and control flow through the kernel. The result of this preliminary work points to a strong possibility
of both temporal and path non-determinism in tasks executing in kernel space, due to complexity of the
execution environment. This inherent diversity of OS kernel state could be useful in the protection of
replicated systems against residual faults in the execution platform
Details
Original language | English |
---|---|
Number of pages | 8 |
Publication status | Published - 2013 |
Peer-reviewed | Yes |
Conference
Title | 15th Real Time Linux Workshop (RTLW '13), OSADL, 2013 |
---|---|
Abbreviated title | OSADL 2013 |
Conference number | |
Duration | 28 October 2013 |
Degree of recognition | International event |
Location | |
City | Lugano |
Country | Switzerland |