Josh Poimboeuf
a3efb7e1aa
Merge pull request #177 from spartacus06/linked-list
...
convert core data structures from arrays to linked-lists
2014-05-12 09:23:36 -05:00
Seth Jennings
a78bb8bcb3
cleanup logic in rela comparison
...
Per review comments.
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-12 08:48:33 -05:00
Seth Jennings
207c237e48
fixup review comments
...
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-09 23:42:11 -05:00
Seth Jennings
c34f4c23e0
Merge pull request #179 from jpoimboe/modprobe-core-module
...
kpatch: try to modprobe core module
2014-05-09 23:24:42 -05:00
Josh Poimboeuf
ac8a54e535
kpatch: try to modprobe core module
...
Try to modprobe the core module, for systems that have the core module
properly installed with depmod.
2014-05-09 20:24:26 -05:00
Seth Jennings
20c7882d93
remove temporary debug message
...
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-07 11:18:54 -05:00
Seth Jennings
08dbc37c75
add null symbol to inventory files
...
Add the null symbol to in inventory files. Before the linked-link
change, the null symbol wasn't included in the inventory. However,
it is required to be a valid ELF file and should be inventoried and
check for in the test.
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-07 10:16:39 -05:00
Seth Jennings
5d36dd1c32
convert from arrays to linked-lists
...
Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-05-07 10:06:41 -05:00
Josh Poimboeuf
a7dc43ab24
Merge pull request #176 from ryanmiao/for-pr-141
...
Fix kpatch.ko build on Ubuntu Saucy.
2014-05-07 09:54:57 -05:00
Jincheng Miao
171cd567ce
Fix kpatch.ko build on Ubuntu Saucy.
...
The error likes:
make -C /lib/modules/3.11.0-12-generic/build M=/home/ryan/kpatch/kmod/core kpatch.ko
make[3]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
CC [M] /home/ryan/kpatch/kmod/core/core.o
/home/ryan/kpatch/kmod/core/core.c:42:32: fatal error: linux/preempt_mask.h: No such file or directory
#include <linux/preempt_mask.h>
I feel sorry to introduce this problem from my laster commit 6c2d6444
.
Some old kernel doesn't have header file preempt_mask.h, and the safe
way is using hardirq.h to find in_nmi().
Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com>
2014-05-07 17:48:02 +08:00
Seth Jennings
135b438af0
Merge pull request #175 from jpoimboe/kpatch-list
...
kpatch: show loaded modules in list command
2014-05-06 14:02:55 -05:00
Josh Poimboeuf
49f832c2b9
kpatch: change "patches" to "patch modules" in list
2014-05-06 12:53:45 -05:00
Josh Poimboeuf
10004a9e6e
kpatch: list loaded modules
2014-05-06 12:52:00 -05:00
Seth Jennings
74fb803eac
Merge pull request #173 from madper/dracut-fix
...
Add dirname to initramfs
2014-05-06 08:51:25 -05:00
Madper Xie
b74395c537
Add dirname to initramfs
...
kpatch script need dirname to git SCRIPTDIR. But dracut won't copy it to
initramfs by default.
Signed-off-by: Madper Xie <cxie@redhat.com>
2014-05-06 17:43:49 +08:00
Josh Poimboeuf
c41319e1a5
Merge pull request #172 from jpoimboe/integration-tests
...
add more integration tests
2014-05-05 20:05:03 -05:00
Josh Poimboeuf
b541692061
test: add test for loading multiple modules
2014-05-05 20:03:57 -05:00
Josh Poimboeuf
1fced0bc3d
test: fix unload_all
2014-05-05 20:03:57 -05:00
Josh Poimboeuf
df2e2daa92
test: send status messages to log file
2014-05-05 20:03:54 -05:00
Josh Poimboeuf
100f358b1d
test: fix custom test error condition check
2014-05-05 17:05:49 -05:00
Josh Poimboeuf
bcbc9d3109
test: make .init sections can't be changed
2014-05-05 17:05:49 -05:00
Josh Poimboeuf
7c60dcf2a3
test: make output messages easier to read
2014-05-05 17:05:49 -05:00
Josh Poimboeuf
46786dad93
test: add custom test for kpatch replace
2014-05-05 17:05:44 -05:00
Josh Poimboeuf
757120d8a0
test: add meminfo-cmdline test
2014-05-05 16:05:00 -05:00
Josh Poimboeuf
a0c9aff4cc
test: fix uninitialized skip variable
2014-05-05 16:05:00 -05:00
Josh Poimboeuf
3ae6bc46ff
test: add cmdline-string test
2014-05-05 16:05:00 -05:00
Josh Poimboeuf
d3aee7c734
test: test 'kpatch reload' and cleanup between tests
2014-05-05 16:04:58 -05:00
Seth Jennings
3866aeab03
Merge pull request #171 from jpoimboe/style
...
kmod/core: minor style fix
2014-05-05 14:01:00 -05:00
Josh Poimboeuf
ab112cce2d
kmod/core: minor style fix
...
For compatibility with checkpatch
2014-05-05 13:40:42 -05:00
Seth Jennings
66cab1d4a2
Merge pull request #170 from jpoimboe/module-special-chars
...
kpatch-build: replace special characters in module name
2014-05-05 11:10:47 -05:00
Josh Poimboeuf
5e4ac36253
kpatch-build: replace special characters in module name
...
Having a '.' in the kmod name confuses lsmod, which prints "Size" and
"Used by" values of -2. Prevent any special characters other than '_'
and '-', so that our patch module names will be consistent with typical
kmod names.
2014-05-05 11:07:35 -05:00
Seth Jennings
2adb1d6837
Merge pull request #168 from jpoimboe/readme-patch-example
...
readme: give a more concrete patch example
2014-05-05 09:01:52 -05:00
Seth Jennings
6ecc8ce254
Merge pull request #169 from jpoimboe/unregister-fix
...
kmod/core: fixes in the unregister path
2014-05-05 09:01:41 -05:00
Josh Poimboeuf
6ee8803978
kmod/core: kpatch_unregister return error if !kpmod->enabled
...
It's probably cleaner to just return -EINVAL if the kpmod isn't enabled,
instead of warning and continuing, which would be dangerous.
I think the reason I had it WARN before is because this condition
shouldn't be possible given the source for the patch module. But the
core module can't necessarily assume that it's our trustworthy patch
module code on the other side.
2014-05-02 23:02:29 -05:00
Josh Poimboeuf
4bde6c3bbf
kmod/core: fix kpatch_num_registered decrement
...
Oops, kpatch_unregister doesn't decrement kpatch_num_registered whenever
it's > 1.
2014-05-02 22:55:32 -05:00
Josh Poimboeuf
9f69d1fe61
readme: give a more concrete patch example
...
I think a more concrete example makes it a little easier to grok.
2014-05-02 22:53:04 -05:00
Seth Jennings
8bce2712c7
Merge pull request #166 from jpoimboe/ftrace-check
...
kmod/core: check for needed kernel config options
2014-05-02 16:30:14 -05:00
Josh Poimboeuf
de40ff3e54
kmod/core: check for needed kernel config options
...
Yes, this is ugly. There's a much cleaner way to do this for an in-tree
module, but this is the only way I know how to do it here.
2014-05-02 16:11:55 -05:00
Seth Jennings
bf45d8dc5e
Merge pull request #160 from jpoimboe/kpatch-load-replace
...
support for "kpatch replace"
2014-05-02 15:49:54 -05:00
Josh Poimboeuf
65810a47d0
kpatch replace
...
Allow the user to atomically replace all existing modules with a new
"kpatch replace" command. This provides a safe way to do atomic
upgrades for cumulative patch module updates.
2014-05-02 15:35:00 -05:00
Josh Poimboeuf
354b399be5
kpatch: reformat usage message
...
In prepraration for "kpatch load --replace", reformat the usage message
to give more room for the command descriptions. Also move the
formatting logic to its own function.
2014-05-02 15:15:25 -05:00
Josh Poimboeuf
b7f32f8ade
gitignore *.o.d
...
When the core module compilation fails, a kmod/core/.core.o.d file
appears.
2014-05-02 15:15:25 -05:00
Seth Jennings
59cbfe63b8
Merge pull request #164 from useidel/master
...
correct build requirements for Fedora 20; yum-utils was missing
2014-05-02 09:41:32 -05:00
Udo Seidel
6ea2a2ffcb
correct build requirements for Fedora 20; yum-utils was missing
2014-05-02 12:18:36 +02:00
Seth Jennings
1717e17290
Merge pull request #162 from jpoimboe/lkml
...
a few style fixes
2014-05-01 16:14:01 -05:00
Josh Poimboeuf
411fd570f2
kmod/core: update a few comments
...
- update the file description comment to be a little more accurate and
concise
- s/trampoline/ftrace handler/
2014-05-01 12:36:28 -05:00
Josh Poimboeuf
b5de5a8b25
kmod/core: checkpatch and sparse fixes
...
- checkpatch doesn't like the FSF address since it's subject to change
- checkpatch doesn't like strings split by line
- whitespace fix
- sparse suggested to change some variables and functions to static
2014-05-01 12:31:33 -05:00
Josh Poimboeuf
d76ba0b9a7
readme: taint clarifications
2014-05-01 12:15:58 -05:00
Josh Poimboeuf
c85467db04
readme: kpatch is an infrastructure, not a tool
2014-05-01 12:15:30 -05:00
Seth Jennings
c3f5766a69
Merge pull request #159 from jpoimboe/nmi-redesign
...
kmod/core: NMI synchronization improvements
2014-04-30 14:37:12 -05:00