klp-build(1)
πΈ NAME
okay so klp-build β the kernel livepatching creation tool. Thatβs literally the whole NAME section, bestie: itβs the klp-build(1) tool for making kernel livepatches, and itβs here to help π
β¨ SYNOPSIS
klp-build <command> [-h] [-n NAME] [--filter FILTER]
π¦ DESCRIPTION
klp-build is a tool meant for automating the whole process of creating and testing livepatches for the Linux kernel (SLE edition). To reduce the burden of livepatch development, itβs also capable of checking which codestreams are vulnerable, batching multiple codestreams in parallel, and remotely building and running tests. whole workflow, no cap β¨
π OPTIONS
Generic options available for all commands:
-h,--helpβ show commandβs help message and exit. polite icon behavior π«Ά-n,--name NAMEβ the livepatch name. This will be the directory name of the resulting livepatches. name your child wisely π--filter FILTERβ list of accepted codestreams. Must be specified in regex format. Example:"15.3u[0-9]+|15.6u0". regex girlies rise
π COMMANDS
π scan
In the scan, klp-build does a shallow analysis of the given CVE, searching for already patched codestreams and reporting those that most likely are still affected by the bug. This subcommand does not store any data, because itβs mainly targeted for automation and not for livepatch development. For the latter, see the setup subcommand. iykyk
--cve CVEβ the CVE to be analyzed. give it the tea
π οΈ setup
During the setup, klp-build analyzes each codestream in order to identify those affected by the indicated CVE. Note that in this phase a lot of per-codestream data is generated and stored for future use. homework era π
--cve CVEβ the CVE assigned to this livepatch.--conf CONFβ the kernelCONFIGused to build the object to be livepatched.--no-checkβ do not check for already patched codestreams; do the setup for all non filtered codestreams.--codestreams CODESTREAMSβ codestreams affected by the CVE. Can be used as a regex, like"15.u[34]". regex again, slay--file-funcs [FILE_FUNCS ...]β file and functions to be livepatched. Can be set multiple times. The format is:--file-funcs file/path.c func1 func2...--file-funcs file/patch2.c func1 func2...--mod-file-funcs [MOD_FILE_FUNCS ...]β module, file and functions to be livepatched. Can be set multiple times. The format is:--mod-file-funcs module1 file/path.c func1 func2...--mod-file-funcs module2 file/patch2.c func1 func2...--conf-mod-file-funcs [CONF_MOD_FILE_FUNCS ...]β conf, module, file and functions to be livepatched. Can be set multiple times. The format is:--conf-mod-file-funcs conf1 module1 file/path.c func1 func2...--conf-mod-file-funcs conf2 module2 file/patch2.c func1 func2...--module MODULEβ the module that will be livepatched for all files. If empty,vmlinuxwill be livepatched instead.--archs {ppc64le,s390x,x86_64} [{ppc64le,s390x,x86_64} ...]β supported architectures for this livepatch. arch buffet--skips SKIPSβ list of excluded codestreams. Must be specified in regex format. Example:"15.3u[0-9]+|15.6u0".
π΅οΈ check-inline
check-inline is in the building, bestie β its options are:
--codestreams CODESTREAMSβ codestream to check the inlined symbol.--file FILEβ file to be checked.--symbol SYMBOLβ symbol to be found. found it, periodt
βοΈ extract
In this phase, klp-build creates the livepatch for each affected codestream based on the data generated during the setup. Results may differ greatly depending on the back-end tool selected for the livepatch creation. backend roulette, but make it kernel π²
--avoid-ext AVOID_EXT [AVOID_EXT ...]β functions to be copied into the livepatch instead of externalizing them. Useful to make sure to include symbols that are optimized in different architectures.--apply-patchesβ apply patches found byget-patchescommand, if they exist.--codestreams CODESTREAMS CODESTREAMSβ apply diff on two different codestreams. two codestreams, one diff
π§ format-patches
Extract patches from kgraft-patches (see the SEE ALSO section).
-v , --version VERSIONβ version to be added, likevX. yes, the comma spacing is exactly like that π
π get-patches
Find and list the kernel versions with a backported fix to the indicated CVE.
--cve CVEβ CVE number to search for related backported patches.
π§Ή cleanup
Remove livepatch packages from SUSE's Build Service. delete, but make it corporate π«Ά
π§ͺ prepare-tests
Generates a tar archive per supported architecture containing scripts and files that can later be used to run tests in the desired test benches. test era loadingβ¦
π push
Push the generated livepatch packages to SUSE's Build Service. By doing so, klp-build can automate the building phase for each codestream and architecture. CI but make it livepatch π₯
--waitβ wait until all codestreams builds are finished.
π status
Check the status of the livepatch building phase initiated by the push command. are we there yet
--waitβ wait until all codestreams builds are finished.
π log
Get build logs from SUSE'S Build Service. receipts, bestie
--cs CSβ the codestream to get the log from.--arch {ppc64le,s390x,x86_64}β build architecture.
π FILES
~/.config/klp-build/configβ personal configuration file. your own little settings corner~/klp/livepatchesβ default directory where the livepatch data will be placed, including the data generated by the different stages of the livepatch creation. main storage vibes~/klp/dataβ default directory where the downloaded source code will be placed. source code goes here, bestie
π EXAMPLES
Check if the codestreams for SLE 15.5 x86_64 and ppc64le are affected by CVE-2022-1048. This CVE affects snd_pcm_attach_substream() and snd_pcm_detach_substream() functions, located in the kernel module snd-pcm.
$ klp-build setup --name bsc1197597 --cve 2022-1048 --mod snd-pcm
--conf CONFIG_SND_PCM --file-funcs sound/core/pcm.c
snd_pcm_attach_substream snd_pcm_detach_substream --codestreams
'15.5' --archs x86_64 ppc64le
π SEE ALSO
- SUSE's
kgraft-patchespublic repository: https://github.com/SUSE/kernel-livepatch - SUSE's
kernel-sourcepublic repository: https://github.com/SUSE/kernel-source klp-ccp(1)
π AUTHOR
Contributors to the klp-build project. See the projectβs GIT history for the complete list. the group chat, but historical
π DISTRIBUTION
The latest version of klp-build may be downloaded from https://github.com/SUSE/klp-build go get the latest, bestie
okay bye bestie π β this was klp-build(1) from the General Commands Manual. Latest version lives at https://github.com/SUSE/klp-build, and thereβs no date on the footer so Iβm not inventing one π
π¦ where this page comes from
- opensuse-leap 16.0: klp-build 0~20250108.8e6c7f6-bp160.1.8 Β· GPL-2.0-only
- π the page's license: GPL-2.0-only
- Copyright (C) 2021-2024 SUSE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms