Chapter 16

KUtrace: Linux Loadable Module

A Linux loadable module is a separately compiled executable that can be dynamically loaded to link against the kernel and add new kernel code. It is the standard mechanism for implementing device drivers and other kernel extensions. One advantage of loadable modules is that they can be changed and rebuilt without recompiling the kernel and without rebooting. The KUtrace loadable module implements reading and writing trace entries and controlling the tracing.

16.1 Kernel Interface Data Structures

There is only a small interface between the kernel patches and the loadable module, consisting of two kernel-exported global variables, shown in Figure 16.1.

Figure 16.1 Kernel-exported interface to loadable ...

Get Understanding Software Dynamics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.