What is Kernel Application Binary Interface (kABI)?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux
  • kernel-abi-stablelists
  • kABI

Issue

  • What is the Kernel Application Binary Interface (kABI)?
  • How does Red Hat maintain the stability of kABI across the Red Hat Enterprise Linux product life cycle?
  • What is the purpose of the kernel-abi-stablelists package?
  • Can non-stablelist kABI symbols be changed or are they compatible within the same minor release?
  • How does kABI differ in various releases of Red Hat Enterprise Linux?

Resolution

  • The Kernel Application Binary Interface (kABI) is a set of in-kernel symbols used by drivers and other kernel modules.

  • The kernel-abi-stablelists packages contain reference files, /lib/modules/kabi-<MAJOR><MINOR>/kabi_stablelist_<ARCH>, listing interfaces provided by the kernel that are considered to be stable by Red Hat engineering. Such interfaces are safe for long-term use by third-party loadable device drivers, as well as for other purposes.

  • With Red Hat Enterprise Linux 7 and 8, the stablelist is valid for the particular major release. This means that once a symbol has been introduced into kABI for a particular major release, it will not be removed, nor will its meaning be changed during that kernel major release complete life cycle.

  • With Red Hat Enterprise Linux 9, each minor release will have a unique stablelist that is valid throughout the minor release lifecycle. For more information on this, please refer to the following knowledgebase article;

  • Red Hat recommends recompiling kernel modules against every minor release of Red Hat Enterprise Linux.

  • With the introduction of CentOS Stream, it is possible to build out-of-tree kernel modules against the ongoing development of the Red Hat Enterprise Linux kernel.

  • The kABI whitelist package name varies with the major release version: kabi-whitelists (Red Hat Enterprise Linux 6), kernel-abi-whitelists (Red Hat Enterprise Linux 7,8) and kernel-abi-stablelists (Red Hat Enterprise Linux 8,9).

    # rpm -ql kernel-abi-stablelists /lib/modules/kabi-current 
    /lib/modules/kabi-rhel84 
    /lib/modules/kabi-rhel84/kabi_stablelist_aarch64 
    /lib/modules/kabi-rhel84/kabi_stablelist_ppc64le 
    /lib/modules/kabi-rhel84/kabi_stablelist_s390x 
    /lib/modules/kabi-rhel84/kabi_stablelist_x86_64 
    
  • Please note that, in very rare and special circumstances, a symbol in a kABI stablelist needs to be changed. For example, Red Hat could introduce kABI breakage when a critical security issue cannot be resolved without breaking kABI. Red Hat will inform the partners if such a situation should occur.

Non-stablelist kABI

  • Red Hat generally strives not to make changes even to non-stablelist kABI symbols in regular security and errata updates. However, there is no guarantee that the symbols will be compatible within the same minor release.

  • When non-stablelist kABI symbols are changed in the kernel updates, it is not considered to be kABI breakage.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments