Commit Graph

42 Commits

Author SHA1 Message Date
George Guo 431e0b22a8 patch-author-guide: correct the example CVE ID information
The official website says CVE users should reference
CVE-2016-5696 instead of CVE-2016-5389.

Signed-off-by: George Guo <guodongtai@kylinos.cn>
2024-08-01 09:40:21 +08:00
Ryan Sullivan 27d0a22c8a INSTALL.md: update OpenEuler prereqs formatting
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>
2023-05-09 14:46:58 -04:00
Sumanth Korikkar 324a43714b doc: Update s390 kernel prerequisite
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
2023-02-23 15:30:01 +01:00
Josh Poimboeuf 41128c0987 patch-author-guide: update jump label / static call descriptions
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>
2022-12-01 14:00:09 -08:00
Sandro c23661cfeb
Add syntax highlighting to code blocks 2022-09-14 11:51:16 +02:00
Joe Lawrence dc7e5cb03d
Merge pull request #1203 from sumanthkorikkar/s390x-kpatch-support
S390x kpatch support
2022-06-29 09:55:53 -04:00
Sumanth Korikkar 48d997f2a3 README: Update s390 as supported and backporting info
* Add s390 as supported.
* Add backporting information for the distros.

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
2022-05-25 06:20:04 +02:00
Joe Lawrence b6b650a006 Makefile: add dependencies target
Installing the dependencies should be a one-step operation for the user.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2022-05-23 08:47:18 -04:00
Joe Lawrence 6a0dcb0da8
Merge pull request #1263 from anatasluo/master
kpatch-build: add support for openEuler
2022-05-13 10:00:22 -04:00
anatasluo e680087567 doc/install.md: add instructions for openEuler
Signed-off-by: anatasluo <luolongjuna@gmail.com>
2022-05-07 10:04:45 +08:00
Yannick Cote 7b4e422cba
doc: fix internal link to supported arches
Signed-off-by: Yannick Cote <ycote@redhat.com>
2022-05-04 12:10:41 -04:00
Josh Poimboeuf b0444d2599
Merge pull request #1173 from jpoimboe/syscall-macros
Add syscall macros
2022-04-26 11:44:02 -05:00
Josh Poimboeuf e6c1c082ce readme: bring README.md into the 21st century
Update a lot of the old cruft and move the boring installation stuff to
a separate file.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-04-22 09:28:55 -07:00
Josh Poimboeuf 286e85fddf patch-author-guide: Add TOC
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-04-22 09:10:16 -07:00
Josh Poimboeuf fe5df04d30 patch-author-guide: Add section about patching syscalls
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-04-22 08:40:00 -07:00
Josh Poimboeuf b21b35f7d4 patch-author-guide: Add latest jump label status
Mention that jump labels in patched functions are mostly supported for
Linux 5.8+.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2022-04-22 08:38:14 -07:00
Song Liu 69e69d59e8 doc: kpatch-build uses "replace" flag by default
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>
2021-05-25 15:19:16 -07:00
Joe Lawrence f91bd455f2 patch-author-guide: add MODVERSIONS blurb to author guide
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>
2020-08-17 12:38:32 +01:00
Joe Lawrence 354e204540 patch-author-guide: mention issue #1124 __LINE__ shift
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>
2020-07-21 16:22:17 -04:00
Yannick Cote ebc776a4fc
patch-author-guide: fix typo in code
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>
2020-04-17 11:50:06 -04:00
Joe Lawrence 64027b4c9e patch-author-guide: remove kpatch.ko-era references
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>
2019-12-05 15:01:01 -05:00
Joe Lawrence cd305fd7ec patch-author-guide: add sibling call info
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>
2019-12-05 15:00:58 -05:00
Joe Lawrence 59fbf45d8e patch-author-guide: add jump label notes
Add a quick explanation for jump labels and how to workaround the
current limitations.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2019-12-05 14:48:29 -05:00
Joe Lawrence 1e2f73216f patch-author-guide: explain "inline" and implicit "notrace"
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>
2019-12-05 14:48:29 -05:00
Julien Thierry e4b6e1ff6e doc: Update broken hyperlink
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>
2019-11-14 11:39:25 +00:00
Joe Lawrence fb06282505 patch-author-guide: more on locks in callbacks
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>
2018-04-13 15:13:18 -04:00
Artem Savkov 808a6b83de patch-author-guide: sleeping locks in callbacks
Add a note about dealing with sleeping locks in callbacks.
2018-04-06 16:28:02 +02:00
Joe Lawrence 926e4e0c7d kmod: add support for in-kernel livepatch hooks
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>
2018-03-23 10:32:14 -04:00
Simon Ruderich c06d17f020 doc: patch-author-guide: fix minor typo 2017-10-12 09:15:18 +02:00
Josh Poimboeuf 8bc0b5cf39 doc: document workaround for printk_once() and friends
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>
2017-09-22 14:52:09 -05:00
Joe Lawrence 29d11709c3 doc: more unexpected changed function examples 2017-04-20 17:11:25 -04:00
Joe Lawrence e124028b65 doc: shadow variable notes 2017-04-20 11:17:54 -04:00
Joe Lawrence dd18205539 doc: code removal blurb 2017-04-20 11:17:51 -04:00
Joe Lawrence 2ae4f5af4a doc: function prototype change workaround suggestion 2017-04-20 10:47:18 -04:00
Joe Lawrence 81c4f63642 doc: add locking semantic example 2017-03-27 13:36:35 -04:00
Joe Lawrence de4042304c doc: add data semantic example to author guide 2017-03-27 11:42:28 -04:00
Joe Lawrence d072845816 doc: clarify (un)load hook execution context 2017-03-27 11:42:23 -04:00
Joe Lawrence d90b9afbd9 doc: add shadow variable example to patch author guide
Add shadow variable examples and text.
2017-03-15 14:50:31 -04:00
Joe Lawrence d7aae34a0d doc: add (un)load hook example to patch author guide
Describe the kpatch (un)load hooks a little more and add in an example
from a recent CVE fix.
2017-03-14 15:48:34 -04:00
Josh Poimboeuf 7535471b1d doc: some patch author guide updates
Update the patch author guide to reflect some recent experiences (with
upstream commits 19be0eaffa3a and 906c55579a63).
2016-11-18 10:59:07 -06:00
Chris J Arges b28c2b0638 Add section on removing static local references.
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.
2016-07-01 14:21:29 -05:00
Josh Poimboeuf 85b7a76acc doc: patch author guide, first take
Been wanting to write this forever, have to start somewhere...
2015-11-16 15:23:16 -06:00