SUSE SolidDriver Program
Kernel Module Packages
SUSE Linux Enterprise products use the RPM software packaging format for software delivery, installation, and maintenance The package installation stack within SUSE Linux Enterprise is designed to consume and process RPM packages for installation.
Because of this, it’s only natural that the SUSE SolidDriver program standardizes on RPM as the recommended way to package kernel drivers. In addition to simply utilizing the RPM format, SUSE has developed an approach specifically designed for packaging kernel modules. This packaging scheme is known as the Kernel Module Package or KMP.
The KMP defines the location where kernel module object files are installed on the system. This insures compatibility at the file system level between the KMP and other installed packages - specifically the kernel packages.
The SUSE Linux Enterprise products come with a variety of kernels to choose from depending on use case. These kernels are divided by architecture and flavor. The architecture would be the platform CPU architecture (e.g x86_64, i586, ppc64, ia64 etc.) while the flavor matches a specific kernel configuration like pae, xen, trace or the most common, default. Each of these architecture and flavor combinations provides a different, and incompatible kABI which requires separate kernel module object files to be compiled for each target kernel that a driver is developed to work with.
The KMP standard will build, from a single source, kernel modules for each kernel. The build process handles the details behind the scenes which makes the procedure easy for developers. The result is separate sub-packages - one for each kernel type.
In addition to the proper location of the installed files, and the intrinsic handling of different kernel flavors, the KMP brings two other capabilities unique to kernel modules:
- modalias hints
- kABI dependency hints
The former allows for automated installation of the proper KMPs that matches the underlying hardware while the later ensures that KMPs and kernels are compatible with each other before they are installed.
Automatic Installation via modaliases
Understanding exactly which kernel drivers are required for a given hardware product can be a difficult and baffling routine. Kernel drivers have arcane and sometimes outdated nomenclature like: tg3, bnx2x, ixgbe, qla2xxx etc. Kernel module packages usually carry the same naming as the kernel modules themselves and since many of them are used generically across different releases and models of hardware, there is no easy way to indicate which exact driver and version is tested and supported with specific hardware products. To complicate matter further, KMPs come in sets of RPM sub-packages - one for each possible kernel configuration. A customer typically only requires one or two of the sub-packages and knowing which one might not be easily known.
When kernel drivers are delivered in properly built KMPs, the SUSE installer can pick an choose the right packages to install on a given system. The installer will query the underlying hardware for a list of components, which are identified using unique PCI or USB IDs. The ID strings are stored in what are called modalias strings and are the same ones used by the system to determine which kernel modules to load upon hardware detection.
Each KMP in turn provides a list of IDS that it supplements. The SUSE installer will query all enabled package repositories for packages supplementing the underlying hardware and when a match is found, the package(s) are selected for installation. The installer also uses information provided by the KMP to install the one built for the installed kernel.
Properly built kernel module packages streamline the kernel driver deployment by allowing customers to simply place the packages in repositories accessed by the SUSE installer. The intelligence built into the installer handles the rest.
Kernel ABI Compatiblity
It’s important that structures kernel modules to interface with the kernel are compatible with the installed kernel. This interface is called the kernel ABI or kABI. See the section “Kernel Modules” at the beginning of this document for more information on kABI and kernel module compatibility.
Kernel modules that do not use a compatible kABI will fail to load into the running kernel. Installing a kernel module update that fails to load can result in missing functionality crucial for system operation and can even lead to a non-bootable system. Therefore it’s important to ensure that only kernel modules that are compatible with the system kernel are installed. Equally important is to only install kernel updates that are compatible with installed, third party kernel modules.
By leveraging the package inter-dependency mechanisms of the KMP standard, the SUSE SolidDriver program helps protect users from unknowingly creating a state of incapability when installing kernel drivers or kernel updates.
The SUSE Linux Enterprise kernel packages are built containing a list of kABI symbol sets that they provide. In turn, KMPs are built containing a list of symbol sets that they require. During installation of either kernel or kernel module packages, the SUSE package installer will verify that the symbol sets match. If not, a package dependency error is thrown, and the package is not installed. In this way, we ensure that incompatible kernels or kernel modules are not installed and save the user from potential complications with system operation.
Putting the Pieces Together
The KMP Pictorial View illustration above shows how all the pieces of the kernel module package fit together. On the left hand side are the components of the package including the actual package files (in rounded boxes) and package meta data (dog-eared rectangles). In the middle is the KMP itself where all the components are packaged. To the right of the KMP extend arrows to ellipses designating the different modes of installing the KMP onto the target system at the far right of the figure.
Below is a brief description of each of the KMP components:
- This is the actual kernel module object file or files.
- Package documentation.
- Optional, supplemental utilities programs and scripts to be used in conjunction with the kernel module.
- Package text that briefly describes the contents of the package. This includes both the RPM Summary and RPM Description.
- String indicating the vendor producing and supporting the package.
- The public part of a digital signature of the package that ensures that the package has not been altered by anyone other than that owning the private key of the signature.
- The kABI symbol set dependencies of the kernel module.
- The modalias list linking this package to the specific hardware that the kernel module supports.
These pieces are packaged into the KMP which is installable onto the target system using YaST, AutoYaST, or zypper (SUSE’s native package installation tools). In addition KMPs can be integrated into appliances using SUSE’s KIWI tool set. Lastly, since KMPs are standard RPM packages, they can be installed using the plain
rpm command. The
rpm bubble is shown in lightly subdued because it’s considered by SUSE to be a low level tool that does not provide the richness of features that the SUSE installers provide.