Commit Graph

22 Commits

Author SHA1 Message Date
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