Shrink the size of the sub-section header below the OpenEuler section,
reducing confusion as to what section that is a part of, as it is only
necessary for OpenEuler machines.
Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
Now that we have KPATCH_STATIC_CALL(), document its usage. While at it,
give a more thorough description for why jump labels and static calls
aren't supported in some scenarios.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Add documentation about kpatch-build enables livepatch "replace" flag by
default, and provides -R|--non-replace option to disable the flag.
Signed-off-by: Song Liu <song@kernel.org>
Explain MODVERSIONS in enough detail for a kpatch author:
- What is it
- How does a kpatch interact with it
- How does kpatch-build report problems
- How to fix / avoid CRC mismatches
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Issue #1124 ("Jump label issues are triggered from an unrelated
function") was caused by a minor __LINE__ change in a pr_warn statement.
Reference it here in the author guide for future reference.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
In shadow-newpid.patch, a new structure member is created using the
klp_shadow_get_or_alloc() routine. The simplified and explained version
of it in the patch author guide has a typo that replaces
klp_shadow_get_or_alloc() with klp_shadow_get().
Signed-off-by: Yannick Cote <ycote@redhat.com>
The kpatch.ko support module is no longer needed by modern upstream and
recent distribution kernels, so update the patch author guide
accordingly.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
kpatch-build doesn't support GCC's sibling call optimizations in patched
functions to avoid potentially dangerous generated code. Explain the
error message that may result and link to the commit which provided
detailed explanation of why we disabled support for this in kpatch.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
The kernel's definition of "inline" implies "notrace" and that may lead
to unexpected kpatch-build errors. Explain why that is and how to work
around the issue.
Fixes#983.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Referenced kernel documentation has moved from txt file to rst. Update
the hyperlink to point to the correct file.
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Elaborate on the difficulties in using locks/mutexes from the kpatch
callback routines and suggest a few workarounds.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Upstream 4.15 kernels provide support for pre and post (un)patch
callbacks, inspired by the kpatch load hooks. Add support for them
in the livepatch-patch-hook.
At the same time, convert the kpatch hooks to use the same API.
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
I couldn't find a good place in the document for this, so I just added
an "Other issues" section at the end.
Fixes#738.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This was discovered when trying to patch a netfilter issue and resulted in the following issue:
https://github.com/dynup/kpatch/issues/599
This patch adds some documentation in case this situation is encountered in the future.