1KSPLICE-CREATE(8) Ksplice KSPLICE-CREATE(8)
2
3
4
6 ksplice-create - Create a set of kernel modules for a rebootless kernel
7 update
8
10 ksplice-create [OPTIONS] --patch=PATCH_FILE KERNEL_SOURCE
11
12 ksplice-create [OPTIONS] --diffext=EXTENSION KERNEL_SOURCE
13
14 ksplice-create [OPTIONS] --git=COMMIT KERNEL_SOURCE
15
16 ksplice-create [OPTIONS] --prebuild KERNEL_SOURCE
17
19 ksplice-create creates a set of Ksplice kernel modules that, when
20 loaded, will apply a user-specified source code patch to the running
21 binary kernel.
22
23 Before you use ksplice-create on a patch, you should confirm that the
24 desired source code change does not make any semantic changes to kernel
25 data structures--that is, changes that would require existing instances
26 of kernel data structures to be transformed (e.g., a patch that adds a
27 field to a global data structure would require the existing data
28 structures to change). If you use Ksplice on a patch that changes data
29 structure semantics, Ksplice will not detect the problem and you could
30 experience kernel problems as a result.
31
32 The to-be-applied source code patch can be specified by providing a
33 patch(1) file (--patch=PATCH_FILE) or by providing a file extension
34 (--diffext=EXTENSION).
35
36 If a file extension is specified, then the desired source code patch
37 will be determined by comparing all of the files in the KERNEL_SOURCE
38 directory tree whose names end with the extra extension EXTENSION
39 against the corresponding files without the extra extension. Only the
40 new files containing the extra extension in their filenames should be
41 modified.
42
43 Here is an example of using a file extension to specify a patch:
44
45 $ cp KERNEL_SOURCE/kernel/sys.c KERNEL_SOURCE/kernel/sys.c.prctl_fixed
46 [edit sys.c.prctl_fixed to include the desired changes]
47 $ ksplice-create --diffext=.prctl_fixed KERNEL_SOURCE
48
49 KERNEL_SOURCE must be a directory containing the to-be-updated kernel's
50 original source code. If your Linux distribution applies patches to
51 the Linux kernel during the kernel build process, then those patches
52 must be applied to the KERNEL_SOURCE directory before invoking ksplice-
53 create on that directory. ksplice-create will not modify the source
54 code in the KERNEL_SOURCE directory tree, but it will perform a kernel
55 build in that directory tree.
56
57 ORIG_CONFIG can be used to specify the directory containing the to-be-
58 updated kernel's original .config file and original System.map file
59 (the files should have exactly those names). ORIG_CONFIG defaults to
60 KERNEL_SOURCE/ksplice.
61
62 The default gcc(1) compiler and as(1) assembler on the system should be
63 as close to the compiler and assembler originally used to build the
64 running kernel as possible. If the current compiler and linker are too
65 different from the original compiler and linker, ksplice-apply will
66 abort when applying the update.
67
68 ksplice-create outputs a tar(1) file, compressed with gzip(1),
69 containing the desired Ksplice update modules. This tarball will be
70 created in the current directory, and it can be manipulated using the
71 other Ksplice utilities, such as ksplice-apply.
72
73 The first time that ksplice-create is invoked on a KERNEL_SOURCE
74 directory, it must build that kernel from scratch, which is much slower
75 than the rest of the update-creation process. --prebuild can be used
76 to perform this initial kernel build without providing a source code
77 patch.
78
79 In order to patch a function that has previously been patched by
80 Ksplice, the user needs to ensure that the KERNEL_SOURCE directory
81 provided to Ksplice contains the source for the currently running
82 kernel, including any patches that have previously been applied by
83 Ksplice.
84
86 --patch=PATCH_FILE
87 Builds a Ksplice update out of the given patch(1) file
88 PATCH_FILE.
89
90 --diffext=EXTENSION
91 Builds a Ksplice update using the modified source files with
92 names ending in EXTENSION. The patch will be determined by
93 comparing all of the files in the KERNEL_SOURCE directory tree
94 whose names end with the extra extension EXTENSION against the
95 corresponding files without the extra extension.
96
97 --git=COMMIT
98 Builds a Ksplice update using the commit COMMIT in the Git
99 working tree KERNEL_SOURCE. The original state corresponding
100 to the running kernel is remembered in the Git ref
101 refs/ksplice/pre, which will be created from the current HEAD
102 if it does not yet exist (and can be changed using the --series
103 option). Therefore, the source code change to be applied
104 corresponds to the output of git diff ksplice/pre COMMIT.
105
106 --prebuild
107 Compiles the original source code that will be needed to build
108 future Ksplice updates. If any Ksplice updates have previously
109 been built in the KERNEL_SOURCE tree, the source files in the
110 tree are reverted to their original state.
111
112 --series
113 Specifies that the current state of the KERNEL_SOURCE tree
114 should be used as the original source that corresponds to the
115 running kernel. If a Ksplice update has recently been built in
116 the KERNEL_SOURCE tree, this option specifies that the Ksplice
117 update being built should be applied after the previous update
118 in series. This option can be used with --prebuild to forget
119 the previous original state and perform no other action.
120
121 --build-modules
122 For a patch that includes changes to kernel modules, in
123 addition to building a hot update that can be applied to the
124 running kernel, this option will cause ksplice-create to
125 generate a set of new modules based on the updated source code.
126 These modules can be used to replace the kernel modules stored
127 on disk, where they can later be loaded normally after part of
128 the hot update has been applied using ksplice-apply(1)
129 --partial.
130
131 -v, --verbose
132 Causes ksplice-create to print debugging messages about its
133 progress. Using multiple -v options increases the verbosity.
134 The maximum is 2.
135
136 -j JOBS, --jobs=JOBS
137 Specifies the number of jobs to run simultaneously while
138 performing kernel builds. ksplice-create also honors the
139 environment variable CONCURRENCY_LEVEL.
140
141 --patch-opt=OPTIONS
142 Can be used to pass options to patch(1). If this option is NOT
143 specified, then -p1 is passed to patch. If this option is
144 specified, then only the specified options will be passed to
145 patch. This option can be repeated in order to pass multiple
146 options to patch. This option is ignored when the to-be-
147 applied source code patch is specified using --diffext.
148
149 --id=ID Specifies the unique value that will be used as the identifier
150 of the Ksplice update. This identifier will, for example,
151 appear in the name of the update tarball. By default, a random
152 8-character ID will be generated.
153
155 ksplice-apply(8), ksplice-view(8), ksplice-undo(8)
156
158 Please report bugs to <devel@ksplice.com>.
159
161 Jeff Arnold, Anders Kaseorg, and Tim Abbott
162
164 Copyright (C) 2007-2009 Ksplice, Inc.
165
166 This is free software and documentation. You can redistribute and/or
167 modify it under the terms of the GNU General Public License, version 2.
168
169
170
171Ksplice v0.9.9 2009-09-10 KSPLICE-CREATE(8)