forráskódban javítják, aztán majd az újrafordított kernel 1000 helyen különböző byte szekvenciáit egyesével felülirogatják? :)
Majdnem. Forráskódban javítják és a patch-ben levő hívásokra cserélik a futó kernel módosított függvényeit.
kpatch-build: a collection of tools which convert a source diff patch to a patch module.
(kiemelés tőlem)
The primary steps in kpatch-build are:
Build the unstripped vmlinux for the kernel
Patch the source tree
Rebuild vmlinux and monitor which objects are being rebuilt. These are the "changed objects".
Recompile each changed object with -ffunction-sections -fdata-sections, resulting in the changed patched objects
Unpatch the source tree
Recompile each changed object with -ffunction-sections -fdata-sections, resulting in the changed original objects
For every changed object, use create-diff-object to do the following:
Analyze each original/patched object pair for patchability
Add .kpatch.funcs and .rela.kpatch.funcs sections to the output object. The kpatch core module uses this to determine the list of functions that need to be redirected using ftrace.
Add .kpatch.dynrelas and .rela.kpatch.dynrelas sections to the output object. This will be used to resolve references to non-included local and non-exported global symbols. These relocations will be resolved by the kpatch core module.
Generate the resulting output object containing the new and modified sections
Link all the output objects into a cumulative object
Generate the patch module
https://github.com/dynup/kpatch
BlackY
--
"en is amikor bejovok dolgozni, nem egy pc-t [..] kapcsolok be, hanem a mainframe-et..." (sj)