Skip to content

[4/4] Introduce the kabi tool from Oracle and custom enhancements + documentation.#5

Merged
casasnovas merged 19 commits intomainfrom
quentin-kabi
Mar 16, 2026
Merged

[4/4] Introduce the kabi tool from Oracle and custom enhancements + documentation.#5
casasnovas merged 19 commits intomainfrom
quentin-kabi

Conversation

@casasnovas
Copy link
Copy Markdown
Collaborator

@casasnovas casasnovas commented Mar 2, 2026

This pull-request adds a new tool, kabi, imported from the Oracle UEK sources. Modifications are
made to it to add an interactive interface augmented with many information required when handling
kABI changes, most notably:

  • The list of our maintained binary drivers impacted by the kABI change
  • The list of exported symbols modified by a particular type change
  • The output of pahole for the original/rebased type
  • The list of guilty commits leading to the type change

This PR includes extensive and almost exhaustive documentation on how to neutralize kABI changes.

This pull-request is the last in a series adding tools and documentation on maintaining
our dom0 kernel - for extra context, the final state can be seen here (the final README
especially):

https://github.com/xcp-ng/hypervisor-dev/tree/quentin-main

I've tried to split the changes into palatable/reviewable PRs, full list:

@casasnovas
Copy link
Copy Markdown
Collaborator Author

To test the kabi tool, you can run:

cd /path/to/hypervisor-dev/repo/
( cd scripts/kabi ; pip install -e . )
kabi tui \
    --repository /path/to/linux/repo \
    --rev-list v4.19.19..origin/kernel/xcpng-4.19.325-cip129.8.0.44.1/base \
    --old-vmlinux ./kernel-abis/vmlinux-4.19.19.o \
    --new-vmlinux ./kernel-abis/vmlinux-4.19.325-cip129.o \
    --locked-file ./kernel-abis/xcpng-8.3-kabi_lockedlist \
    ./kernel-abis/Modules.kabi-4.19.19 ./kernel-abis/Symtypes.build-4.19.325-cip129

Note

The vmlinux.o files are included in the repo to allow reviewers to play with the tool and/or review the rebase without having to rebuild the original / modified kernel. They are stored with git lfs.

@casasnovas casasnovas force-pushed the quentin-kabi branch 2 times, most recently from ad30208 to 74f5bd3 Compare March 12, 2026 08:31
@casasnovas casasnovas force-pushed the quentin-xs-merge branch 2 times, most recently from 371cbd3 to 29d1b6c Compare March 12, 2026 08:38
@casasnovas casasnovas force-pushed the quentin-kabi branch 2 times, most recently from 4fbe474 to 2cbf9df Compare March 12, 2026 08:42
@casasnovas casasnovas force-pushed the quentin-kabi branch 2 times, most recently from 7b66050 to 97c3543 Compare March 13, 2026 06:24
@casasnovas casasnovas changed the base branch from quentin-xs-merge to main March 16, 2026 14:11
Copy link
Copy Markdown

@fallen fallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Source: https://github.com/oracle/linux-uek/blob/uek6/u3/uek-rpm/tools/kabi

The branch uek6/u3 was pointing to: aa0f76ed9c5865dc1592653877c9fa3ec56e3ad

Original commit description:

  When kABI breakages are detected, a common reason is that struct members
  referenced by a function argument have changed. Since genksyms
  recursively includes definitions of every referenced struct, the changed
  struct may be very unrelated to the function whose kABI broke, and
  check-kabi can do very little to diagnose the reason.

  However, genksyms can produce "symtypes" data, which contains the
  definitions of each type genksyms needed to produce the kABI hashes for a
  given compilation unit. Create a tool which is capable of combining all
  symtypes files produced by a kernel build, minimizing them, and then
  filtering them to contain only data relevant to a kABI definition.

Original-Author: Stephen Brennan <stephen.s.brennan@oracle.com>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
This was generated using:

  kabi collect /path/to/source/rpm/repo/BUILD/ -o Symtypes.build-<version>

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
This was generated using:

  ./scripts/kabi consolidate \
       --locked-list kernel-abis/xcpng-8.3-kabi_lockedlist
       --input kernel-abis/Symtypes.build-<version>
       --output kernel-abis/Modules.kabi-<version>

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
This will be useful for reviewers of the v4.19 kernel rebase, or folks
playing with the kabi tool, without having them rebuild the kernel to test.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
This new interface presents the type changes as well as different
useful information when having to neutralize them:
- binary modules impacted by the change
- pahole output for old/new type
- commits introducing the kABI changes
- exported symbols impacted by the type change
- file where the type is defined

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
@casasnovas
Copy link
Copy Markdown
Collaborator Author

Thanks for all the reviews!!

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
…abi script too.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
…i script too.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
…site actions.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
@casasnovas casasnovas merged commit 7b7b1ee into main Mar 16, 2026
6 checks passed
@casasnovas casasnovas deleted the quentin-kabi branch March 16, 2026 15:01
@casasnovas casasnovas restored the quentin-kabi branch March 16, 2026 15:03
@casasnovas casasnovas deleted the quentin-kabi branch March 16, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants